Fix bug where aggregate resets record filters (#10136)

This PR fixes a bug where setting an aggregate in the footer of a record
table makes the currentRecordFilters state being overwritten by the
view, which we don't want.
This commit is contained in:
Lucas Bordeau
2025-02-11 19:14:18 +01:00
committed by GitHub
parent 252922b522
commit b757a37d07
2 changed files with 30 additions and 1 deletions

View File

@ -0,0 +1,9 @@
import { RecordFiltersComponentInstanceContext } from '@/object-record/record-filter/states/context/RecordFiltersComponentInstanceContext';
import { createComponentFamilyStateV2 } from '@/ui/utilities/state/component-state/utils/createComponentFamilyStateV2';
export const hasInitializedCurrentRecordFiltersComponentFamilyState =
createComponentFamilyStateV2<boolean, { viewId?: string }>({
key: 'hasInitializedCurrentRecordFiltersComponentFamilyState',
defaultValue: false,
componentInstanceContext: RecordFiltersComponentInstanceContext,
});