Fix: Tasks-List-page-Person-Switcher (#6077)

Fixes #6007, adds context to the ObjectFilter DropdownRecordSelect
This commit is contained in:
srikary12 2024-07-01 15:36:30 +05:30 committed by GitHub
parent 632e34fc7b
commit 4599f43b6c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 4 deletions

View File

@ -13,7 +13,12 @@ import { isDefined } from '~/utils/isDefined';
export const EMPTY_FILTER_VALUE = '[]';
export const MAX_RECORDS_TO_DISPLAY = 3;
export const ObjectFilterDropdownRecordSelect = () => {
type ObjectFilterDropdownRecordSelectProps = {
viewComponentId?: string;
}
export const ObjectFilterDropdownRecordSelect = ({
viewComponentId,
}: ObjectFilterDropdownRecordSelectProps) => {
const {
filterDefinitionUsedInDropdownState,
objectFilterDropdownSearchInputState,
@ -25,8 +30,8 @@ export const ObjectFilterDropdownRecordSelect = () => {
emptyFilterButKeepDefinition,
} = useFilterDropdown();
const { removeCombinedViewFilter } = useCombinedViewFilters();
const { currentViewWithCombinedFiltersAndSorts } = useGetCurrentView();
const { removeCombinedViewFilter } = useCombinedViewFilters(viewComponentId);
const { currentViewWithCombinedFiltersAndSorts } = useGetCurrentView(viewComponentId);
const filterDefinitionUsedInDropdown = useRecoilValue(
filterDefinitionUsedInDropdownState,

View File

@ -75,7 +75,7 @@ export const SingleEntityObjectFilterDropdownButton = ({
<ObjectFilterDropdownSearchInput />
<DropdownMenuSeparator />
<ObjectFilterDropdownRecordRemoveFilterMenuItem />
<ObjectFilterDropdownRecordSelect />
<ObjectFilterDropdownRecordSelect viewComponentId={"single-entity-filter-dropdown"}/>
</>
}
/>