5b544809f7
## Demo https://github.com/user-attachments/assets/59e530ea-1c5b-44be-a012-42551e68221c ## Demo – creating a new group https://github.com/user-attachments/assets/e8511bc3-d586-422c-aca8-b02794a0c84f ## Demo – ungrouped fields https://github.com/user-attachments/assets/6ded4a90-fb08-485e-ad08-086f3a970752 Closes https://github.com/twentyhq/core-team-issues/issues/2232 Closes https://github.com/twentyhq/core-team-issues/issues/2237 Closes https://github.com/twentyhq/core-team-issues/issues/2238
12 lines
598 B
TypeScript
12 lines
598 B
TypeScript
import { type FieldsWidgetGroupField } from '@/page-layout/widgets/fields/types/FieldsWidgetGroup';
|
|
import { createAtomComponentState } from '@/ui/utilities/state/jotai/utils/createAtomComponentState';
|
|
|
|
import { PageLayoutComponentInstanceContext } from './contexts/PageLayoutComponentInstanceContext';
|
|
|
|
export const fieldsWidgetUngroupedFieldsPersistedComponentState =
|
|
createAtomComponentState<Record<string, FieldsWidgetGroupField[]>>({
|
|
key: 'fieldsWidgetUngroupedFieldsPersistedComponentState',
|
|
defaultValue: {},
|
|
componentInstanceContext: PageLayoutComponentInstanceContext,
|
|
});
|