mirror of https://github.com/apache/superset.git
chore: Reverts reset form in native filters (#15644)
This commit is contained in:
parent
52ad779a27
commit
f0c0d7492c
|
@ -164,6 +164,15 @@ export function FiltersConfigModal({
|
||||||
addFilter,
|
addFilter,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// After this, it should be as if the modal was just opened fresh.
|
||||||
|
// Called when the modal is closed.
|
||||||
|
const resetForm = () => {
|
||||||
|
setNewFilterIds([]);
|
||||||
|
setCurrentFilterId(initialCurrentFilterId);
|
||||||
|
setRemovedFilters({});
|
||||||
|
setSaveAlertVisible(false);
|
||||||
|
};
|
||||||
|
|
||||||
const getFilterTitle = (id: string) =>
|
const getFilterTitle = (id: string) =>
|
||||||
formValues.filters[id]?.name ??
|
formValues.filters[id]?.name ??
|
||||||
filterConfigMap[id]?.name ??
|
filterConfigMap[id]?.name ??
|
||||||
|
@ -208,6 +217,7 @@ export function FiltersConfigModal({
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleConfirmCancel = () => {
|
const handleConfirmCancel = () => {
|
||||||
|
resetForm();
|
||||||
onCancel();
|
onCancel();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue