7336 create contextstore (#7374)
Closes #7336 Create 3 states: - `contextStoreCurrentObjectMetadataIdState`: is set when we change object metadata - `contextStoreCurrentViewIdState`: is set when we change view - `contextStoreTargetedRecordIdsState`: is set when we select records inside a table or a board or when a show page is opened. Is reset when we change view.
This commit is contained in:
@ -0,0 +1,8 @@
|
||||
import { createState } from 'twenty-ui';
|
||||
|
||||
export const contextStoreCurrentObjectMetadataIdState = createState<
|
||||
string | null
|
||||
>({
|
||||
key: 'contextStoreCurrentObjectMetadataIdState',
|
||||
defaultValue: null,
|
||||
});
|
||||
@ -0,0 +1,6 @@
|
||||
import { createState } from 'twenty-ui';
|
||||
|
||||
export const contextStoreCurrentViewIdState = createState<string | null>({
|
||||
key: 'contextStoreCurrentViewIdState',
|
||||
defaultValue: null,
|
||||
});
|
||||
@ -0,0 +1,6 @@
|
||||
import { createState } from 'twenty-ui';
|
||||
|
||||
export const contextStoreTargetedRecordIdsState = createState<string[]>({
|
||||
key: 'contextStoreTargetedRecordIdsState',
|
||||
defaultValue: [],
|
||||
});
|
||||
Reference in New Issue
Block a user