@@ -431,6 +431,7 @@ const FilterComponent = ({
431431 const dispatch = useDispatch ( ) ;
432432 const [ applyFilter , setApplyFilter ] = useState ( false ) ;
433433 const [ searchText , setSearchText ] = useState ( false ) ;
434+ const [ isClearable , setIsClearable ] = useState ( true ) ;
434435 const members = useSelector ( organizationSelectors . myMembers ) ;
435436 const pipelines = useSelector ( pipelineSelectors . myPipelines ) ;
436437 const stacks = useSelector ( stackSelectors . mystacks ) ;
@@ -864,13 +865,15 @@ const FilterComponent = ({
864865 options = { pipelines as any }
865866 styles = { selectStyles }
866867 onInputChange = { ( e : any ) => callActionForPipelines ( e ) }
867- onChange = { ( value : any ) =>
868- handleChangeForSearchable ( filter , value . id )
869- }
868+ onChange = { ( value : any ) => {
869+ if ( value ) {
870+ handleChangeForSearchable ( filter , value . id ) ;
871+ }
872+ } }
873+ isClearable = { isClearable }
870874 // value={'role'}
871875 className = { styles . searchableInput }
872876 // classNamePrefix="select"
873- isClearable = { false }
874877 />
875878 ) : filter ?. column ?. selectedValue ?. value ===
876879 'stack_id' ? (
@@ -880,13 +883,15 @@ const FilterComponent = ({
880883 options = { stacks as any }
881884 styles = { selectStyles }
882885 onInputChange = { ( e : any ) => callActionForStacks ( e ) }
883- onChange = { ( value : any ) =>
884- handleChangeForSearchable ( filter , value . id )
885- }
886+ onChange = { ( value : any ) => {
887+ if ( value ) {
888+ handleChangeForSearchable ( filter , value . id ) ;
889+ }
890+ } }
891+ isClearable = { isClearable }
886892 // value={'role'}
887893 className = { styles . searchableInput }
888894 // classNamePrefix="select"
889- isClearable = { false }
890895 />
891896 ) : (
892897 < Select
@@ -895,13 +900,16 @@ const FilterComponent = ({
895900 options = { members as any }
896901 styles = { selectStyles }
897902 onInputChange = { ( e : any ) => callActionForUsers ( e ) }
898- onChange = { ( value : any ) =>
899- handleChangeForSearchable ( filter , value . id )
900- }
903+ onChange = { ( value : any ) => {
904+ if ( value ) {
905+ handleChangeForSearchable ( filter , value . id ) ;
906+ }
907+ } }
908+ isClearable = { isClearable }
901909 // value={'role'}
902910 className = { styles . searchableInput }
903911 // classNamePrefix="select"
904- isClearable = { false }
912+ // isClearable={false}
905913 />
906914 ) }
907915 </ FlexBox . Row >
0 commit comments