@@ -455,6 +455,7 @@ const FilterComponent = ({
455455 }
456456
457457 setFilter ( [ ...filters ] ) ;
458+ localStorage . setItem ( 'logical_operator' , JSON . stringify ( 'and' ) ) ;
458459 }
459460
460461 function handleChangeForStatus ( filter : any , value : string ) {
@@ -467,6 +468,7 @@ const FilterComponent = ({
467468 filter . filterValue = value ;
468469
469470 setFilter ( [ ...filters ] ) ;
471+ localStorage . setItem ( 'logical_operator' , JSON . stringify ( 'and' ) ) ;
470472 }
471473 function handleChangeForShared ( filter : any , key : string , value : string ) {
472474 // handleValueFieldChange(filter, value)
@@ -482,6 +484,7 @@ const FilterComponent = ({
482484 }
483485
484486 setFilter ( [ ...filters ] ) ;
487+ localStorage . setItem ( 'logical_operator' , JSON . stringify ( 'and' ) ) ;
485488 }
486489 function handleChangeForSearchable ( field : any , value : string ) {
487490 // filter[key].selectedValue =
@@ -527,7 +530,7 @@ const FilterComponent = ({
527530
528531 setFilter ( [ ...filters ] ) ;
529532
530- console . log ( filters , 'field' ) ;
533+ localStorage . setItem ( 'logical_operator' , JSON . stringify ( 'and' ) ) ;
531534 }
532535
533536 function addAnotherFilter ( ) {
@@ -548,10 +551,19 @@ const FilterComponent = ({
548551 fontSize : '12px' ,
549552 display : 'flex' ,
550553 fontFamily : 'Rubik' ,
551- // color: 'red',
552554
553555 // ...base,
554556 } ) ,
557+ singleValue : ( provided : any ) => ( {
558+ ...provided ,
559+ fontSize : '12px' ,
560+ fontFamily : 'Rubik' ,
561+ } ) ,
562+ option : ( provided : any ) => ( {
563+ ...provided ,
564+ fontSize : '12px' ,
565+ fontFamily : 'Rubik' ,
566+ } ) ,
555567 } ;
556568
557569 function checkForName ( typeName : string , value : string ) {
@@ -696,8 +708,10 @@ const FilterComponent = ({
696708 filterValue : value ,
697709 } ,
698710 ] ) ;
711+ localStorage . setItem ( 'logical_operator' , JSON . stringify ( 'or' ) ) ;
699712 } else {
700713 setFilter ( [ getInitials ( ) ] ) ;
714+ localStorage . setItem ( 'logical_operator' , JSON . stringify ( 'and' ) ) ;
701715 }
702716 }
703717
@@ -738,7 +752,7 @@ const FilterComponent = ({
738752 < icons . funnelFill
739753 style = { { padding : '5px 0px 0px 7px' } }
740754 size = { iconSizes . sm }
741- color = { iconColors . primary }
755+ color = { searchText ? iconColors . grey : iconColors . primary }
742756 />
743757 </ Box >
744758 < Box
@@ -755,7 +769,14 @@ const FilterComponent = ({
755769 filters . map ( ( filter : any , index : number ) => {
756770 return (
757771 < FlexBox . Row key = { index } className = { styles . tile } >
758- < Box onClick = { ( ) => hanldeDelete ( index ) } >
772+ < Box
773+ onClick = { ( ) => {
774+ if ( filters . length === 1 ) {
775+ setShowInbar ( false ) ;
776+ }
777+ hanldeDelete ( index ) ;
778+ } }
779+ >
759780 { `${ filter . column . selectedValue . label } ${
760781 filter . column . selectedValue . label === 'Shared' ||
761782 filter . column . selectedValue . label === 'Status'
@@ -1021,6 +1042,9 @@ const FilterComponent = ({
10211042
10221043 < Box
10231044 onClick = { ( ) => {
1045+ if ( filters . length === 1 ) {
1046+ setShowInbar ( false ) ;
1047+ }
10241048 hanldeDelete ( index ) ;
10251049 } }
10261050 className = { styles . removeIcon }
0 commit comments