@@ -31,7 +31,7 @@ interface GroupSelectorProps {
3131
3232const GroupSelector : FC < GroupSelectorProps > = ( props ) => {
3333 const groups = [ { id : - 1 , name : "" } , { id : undefined , name : "Все студенты" } , ...( props . groups || [ ] ) ]
34- const selectedGroup = groups . find ( g => g . id === props . selectedGroupId )
34+ const selectedGroup = groups . find ( g => g . id == props . selectedGroupId )
3535
3636 const [ isDialogOpen , setIsDialogOpen ] = useState ( false ) ;
3737 const [ formState , setFormState ] = useState < {
@@ -110,15 +110,15 @@ const GroupSelector: FC<GroupSelectorProps> = (props) => {
110110 < Grid container xs = { 12 } spacing = { 1 } >
111111 < Grid item xs = { 12 } >
112112 < Autocomplete
113- freeSolo = { props . selectedGroupId !== undefined }
114- disableClearable = { props . selectedGroupId === undefined }
113+ freeSolo = { props . selectedGroupId != undefined }
114+ disableClearable = { props . selectedGroupId == undefined }
115115 fullWidth
116116 options = { [ ...groups ] }
117117 renderOption = { ( props , option ) => {
118118 if ( option . id === - 1 )
119119 return < li { ...props } style = { { color : "#2979ff" } } key = { option . id } > + Добавить новую
120120 группу</ li >
121- if ( option . id === undefined )
121+ if ( option . id == undefined )
122122 return < li { ...props } key = { option . id } > < b > { option . name } </ b > </ li >
123123 return < li { ...props } key = { option . id } > { option . name } </ li >
124124 } }
@@ -129,7 +129,7 @@ const GroupSelector: FC<GroupSelectorProps> = (props) => {
129129 if ( props . selectedGroupId !== newGroup ?. id ) props . onGroupIdChange ( newGroup ?. id )
130130 } }
131131 onInputChange = { ( _ , newInputValue , reason ) => {
132- if ( reason === 'input' && props . selectedGroupId !== undefined ) {
132+ if ( reason === 'input' && props . selectedGroupId != undefined ) {
133133 setFormState ( prevState => ( { ...prevState , name : newInputValue } ) )
134134 }
135135 } }
0 commit comments