7665 handle the select all case inside the action menu (#7742)
Closes #7665 - Handle select all - Handle Filters --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -0,0 +1,6 @@
|
||||
import { createState } from 'twenty-ui';
|
||||
|
||||
export const contextStoreNumberOfSelectedRecordsState = createState<number>({
|
||||
key: 'contextStoreNumberOfSelectedRecordsState',
|
||||
defaultValue: 0,
|
||||
});
|
||||
@ -1,6 +0,0 @@
|
||||
import { createState } from 'twenty-ui';
|
||||
|
||||
export const contextStoreTargetedRecordIdsState = createState<string[]>({
|
||||
key: 'contextStoreTargetedRecordIdsState',
|
||||
defaultValue: [],
|
||||
});
|
||||
@ -0,0 +1,26 @@
|
||||
import { Filter } from '@/object-record/object-filter-dropdown/types/Filter';
|
||||
import { createState } from 'twenty-ui';
|
||||
|
||||
type ContextStoreTargetedRecordsRuleSelectionMode = {
|
||||
mode: 'selection';
|
||||
selectedRecordIds: string[];
|
||||
};
|
||||
|
||||
type ContextStoreTargetedRecordsRuleExclusionMode = {
|
||||
mode: 'exclusion';
|
||||
excludedRecordIds: string[];
|
||||
filters: Filter[];
|
||||
};
|
||||
|
||||
export type ContextStoreTargetedRecordsRule =
|
||||
| ContextStoreTargetedRecordsRuleSelectionMode
|
||||
| ContextStoreTargetedRecordsRuleExclusionMode;
|
||||
|
||||
export const contextStoreTargetedRecordsRuleState =
|
||||
createState<ContextStoreTargetedRecordsRule>({
|
||||
key: 'contextStoreTargetedRecordsRuleState',
|
||||
defaultValue: {
|
||||
mode: 'selection',
|
||||
selectedRecordIds: [],
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user