mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-25 21:13:01 +03:00
Fix: Tasks-List-page-Person-Switcher (#6077)
Fixes #6007, adds context to the ObjectFilter DropdownRecordSelect
This commit is contained in:
parent
632e34fc7b
commit
4599f43b6c
@ -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,
|
||||
|
@ -75,7 +75,7 @@ export const SingleEntityObjectFilterDropdownButton = ({
|
||||
<ObjectFilterDropdownSearchInput />
|
||||
<DropdownMenuSeparator />
|
||||
<ObjectFilterDropdownRecordRemoveFilterMenuItem />
|
||||
<ObjectFilterDropdownRecordSelect />
|
||||
<ObjectFilterDropdownRecordSelect viewComponentId={"single-entity-filter-dropdown"}/>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user