mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-17 13:46:47 +02: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)
|
oneOf(dateOperators, operator)
|
||||||
) {
|
) {
|
||||||
setOperator(IN);
|
setOperator(IN);
|
||||||
} else if (oneOf(stringOperators, operator)) {
|
}
|
||||||
|
|
||||||
|
if (oneOf(stringOperators, operator)) {
|
||||||
setShowCaseSensitiveButton(true);
|
setShowCaseSensitiveButton(true);
|
||||||
|
} else {
|
||||||
|
setShowCaseSensitiveButton(false);
|
||||||
}
|
}
|
||||||
}, [contextName, setOperator, operator, setLocalConstraint]);
|
}, [contextName, setOperator, operator, setLocalConstraint]);
|
||||||
|
|
||||||
@ -86,6 +90,12 @@ export const ConstraintAccordionEditHeader = ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const onOperatorChange = (operator: Operator) => {
|
const onOperatorChange = (operator: Operator) => {
|
||||||
|
if (oneOf(stringOperators, operator)) {
|
||||||
|
setShowCaseSensitiveButton(true);
|
||||||
|
} else {
|
||||||
|
setShowCaseSensitiveButton(false);
|
||||||
|
}
|
||||||
|
|
||||||
if (oneOf(dateOperators, operator)) {
|
if (oneOf(dateOperators, operator)) {
|
||||||
setLocalConstraint(prev => ({
|
setLocalConstraint(prev => ({
|
||||||
...prev,
|
...prev,
|
||||||
@ -93,9 +103,6 @@ export const ConstraintAccordionEditHeader = ({
|
|||||||
value: new Date().toISOString(),
|
value: new Date().toISOString(),
|
||||||
}));
|
}));
|
||||||
} else {
|
} else {
|
||||||
if (oneOf(stringOperators, operator)) {
|
|
||||||
setShowCaseSensitiveButton(true);
|
|
||||||
}
|
|
||||||
setOperator(operator);
|
setOperator(operator);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user