mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	Bug fix - Hide case sensitive button when changing operators (#2015)
This commit is contained in:
		
							parent
							
								
									3331e2aa85
								
							
						
					
					
						commit
						5f3af07e43
					
				| @ -72,8 +72,12 @@ export const ConstraintAccordionEditHeader = ({ | ||||
|             oneOf(dateOperators, operator) | ||||
|         ) { | ||||
|             setOperator(IN); | ||||
|         } else if (oneOf(stringOperators, operator)) { | ||||
|         } | ||||
| 
 | ||||
|         if (oneOf(stringOperators, operator)) { | ||||
|             setShowCaseSensitiveButton(true); | ||||
|         } else { | ||||
|             setShowCaseSensitiveButton(false); | ||||
|         } | ||||
|     }, [contextName, setOperator, operator, setLocalConstraint]); | ||||
| 
 | ||||
| @ -86,6 +90,12 @@ export const ConstraintAccordionEditHeader = ({ | ||||
|     }); | ||||
| 
 | ||||
|     const onOperatorChange = (operator: Operator) => { | ||||
|         if (oneOf(stringOperators, operator)) { | ||||
|             setShowCaseSensitiveButton(true); | ||||
|         } else { | ||||
|             setShowCaseSensitiveButton(false); | ||||
|         } | ||||
| 
 | ||||
|         if (oneOf(dateOperators, operator)) { | ||||
|             setLocalConstraint(prev => ({ | ||||
|                 ...prev, | ||||
| @ -93,9 +103,6 @@ export const ConstraintAccordionEditHeader = ({ | ||||
|                 value: new Date().toISOString(), | ||||
|             })); | ||||
|         } else { | ||||
|             if (oneOf(stringOperators, operator)) { | ||||
|                 setShowCaseSensitiveButton(true); | ||||
|             } | ||||
|             setOperator(operator); | ||||
|         } | ||||
|     }; | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user