fix double filter on slow networks

This commit is contained in:
Mary Hipp 2024-12-18 08:27:16 -05:00 committed by Mary Hipp Rogers
parent 7c9ecdb362
commit 899a00af62

View File

@ -102,12 +102,12 @@ export const ControlLayerControlAdapter = memo(() => {
const filterConfig = defaultFilterForNewModel.buildDefaults();
if (isFiltering) {
adapter.filterer.$filterConfig.set(filterConfig);
// The user may have disabled auto-processing, so we should process the filter manually. This is essentially a
// no-op if auto-processing is already enabled, because the process method is debounced.
adapter.filterer.process();
} else {
adapter.filterer.start(filterConfig);
}
// The user may have disabled auto-processing, so we should process the filter manually. This is essentially a
// no-op if auto-processing is already enabled, because the process method is debounced.
adapter.filterer.process();
},
[adapter.filterer, dispatch, entityIdentifier]
);