fix(native-filters): force update control value on change (#14385)
* fix(native-filters): force update control value on change * fix test
This commit is contained in:
parent
fc0c1155c2
commit
43ee52be57
|
|
@ -123,6 +123,6 @@ test('Clickin on checkbox when resetConfig:flase', () => {
|
|||
expect(props.forceUpdate).not.toBeCalled();
|
||||
expect(setNativeFilterFieldValues).not.toBeCalled();
|
||||
userEvent.click(screen.getByRole('checkbox'));
|
||||
expect(props.forceUpdate).not.toBeCalled();
|
||||
expect(props.forceUpdate).toBeCalled();
|
||||
expect(setNativeFilterFieldValues).not.toBeCalled();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ const ControlItems: FC<ControlItemsProps> = ({
|
|||
<Checkbox
|
||||
onChange={() => {
|
||||
if (!controlItem.config.resetConfig) {
|
||||
forceUpdate();
|
||||
return;
|
||||
}
|
||||
setNativeFilterFieldValues(form, filterId, {
|
||||
|
|
|
|||
Loading…
Reference in New Issue