fix: Dashboard not loading with default first value in filter (#23512)

This commit is contained in:
Geido 2023-03-29 18:18:08 +02:00 committed by GitHub
parent 9fbfd1c1d8
commit 4220d32f3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 6 deletions

View File

@ -129,7 +129,6 @@ export default function PluginFilterSelect(props: PluginFilterSelectProps) {
enableEmptyFilter && !inverseSelection && !values?.length;
const suffix = inverseSelection && values?.length ? t(' (excluded)') : '';
dispatchDataMask({
type: 'filterState',
__cache: filterState,
@ -290,13 +289,9 @@ export default function PluginFilterSelect(props: PluginFilterSelectProps) {
updateDataMask,
data,
groupby,
JSON.stringify(filterState),
JSON.stringify(filterState.value),
]);
useEffect(() => {
updateDataMask(filterState.value);
}, [JSON.stringify(filterState.value)]);
useEffect(() => {
setDataMask(dataMask);
}, [JSON.stringify(dataMask)]);