mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-26 21:53:48 +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 EMPTY_FILTER_VALUE = '[]';
|
||||||
export const MAX_RECORDS_TO_DISPLAY = 3;
|
export const MAX_RECORDS_TO_DISPLAY = 3;
|
||||||
|
|
||||||
export const ObjectFilterDropdownRecordSelect = () => {
|
type ObjectFilterDropdownRecordSelectProps = {
|
||||||
|
viewComponentId?: string;
|
||||||
|
}
|
||||||
|
export const ObjectFilterDropdownRecordSelect = ({
|
||||||
|
viewComponentId,
|
||||||
|
}: ObjectFilterDropdownRecordSelectProps) => {
|
||||||
const {
|
const {
|
||||||
filterDefinitionUsedInDropdownState,
|
filterDefinitionUsedInDropdownState,
|
||||||
objectFilterDropdownSearchInputState,
|
objectFilterDropdownSearchInputState,
|
||||||
@ -25,8 +30,8 @@ export const ObjectFilterDropdownRecordSelect = () => {
|
|||||||
emptyFilterButKeepDefinition,
|
emptyFilterButKeepDefinition,
|
||||||
} = useFilterDropdown();
|
} = useFilterDropdown();
|
||||||
|
|
||||||
const { removeCombinedViewFilter } = useCombinedViewFilters();
|
const { removeCombinedViewFilter } = useCombinedViewFilters(viewComponentId);
|
||||||
const { currentViewWithCombinedFiltersAndSorts } = useGetCurrentView();
|
const { currentViewWithCombinedFiltersAndSorts } = useGetCurrentView(viewComponentId);
|
||||||
|
|
||||||
const filterDefinitionUsedInDropdown = useRecoilValue(
|
const filterDefinitionUsedInDropdown = useRecoilValue(
|
||||||
filterDefinitionUsedInDropdownState,
|
filterDefinitionUsedInDropdownState,
|
||||||
|
@ -75,7 +75,7 @@ export const SingleEntityObjectFilterDropdownButton = ({
|
|||||||
<ObjectFilterDropdownSearchInput />
|
<ObjectFilterDropdownSearchInput />
|
||||||
<DropdownMenuSeparator />
|
<DropdownMenuSeparator />
|
||||||
<ObjectFilterDropdownRecordRemoveFilterMenuItem />
|
<ObjectFilterDropdownRecordRemoveFilterMenuItem />
|
||||||
<ObjectFilterDropdownRecordSelect />
|
<ObjectFilterDropdownRecordSelect viewComponentId={"single-entity-filter-dropdown"}/>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
Loading…
Reference in New Issue
Block a user