mirror of
https://github.com/apache/superset.git
synced 2026-06-01 21:59:26 +00:00
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:
@@ -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, {
|
||||
|
||||
Reference in New Issue
Block a user