Refactor useDropdown states to component state V2 (#12911)
This PR is a follow-up of the first refactor of dropdown hooks : https://github.com/twentyhq/twenty/pull/12875 In this PR we continue by focusing on the replacement of those two states that are still using the v1 of component states : - isDropdownOpenComponentState - dropdownPlacementComponentState When then remove those two old states and now only use the new component state v2. ## QA Component | Status | Comments -- | -- | -- RecordDetailRelationSectionDropdownToMany | Ok | RecordDetailRelationSectionDropdownToOne | Ok | WorkflowVariablesDropdown | Ok | DropdownInternalContainer | Ok | Tested on tables and boards fields
This commit is contained in:
@ -8,7 +8,8 @@ import { ActionMenuContext } from '@/action-menu/contexts/ActionMenuContext';
|
||||
import { createMockActionMenuActions } from '@/action-menu/mock/action-menu-actions.mock';
|
||||
import { ActionMenuComponentInstanceContext } from '@/action-menu/states/contexts/ActionMenuComponentInstanceContext';
|
||||
import { recordIndexActionMenuDropdownPositionComponentState } from '@/action-menu/states/recordIndexActionMenuDropdownPositionComponentState';
|
||||
import { isDropdownOpenComponentState } from '@/ui/layout/dropdown/states/isDropdownOpenComponentState';
|
||||
|
||||
import { isDropdownOpenComponentStateV2 } from '@/ui/layout/dropdown/states/isDropdownOpenComponentStateV2';
|
||||
import { extractComponentState } from '@/ui/utilities/state/component-state/utils/extractComponentState';
|
||||
import {
|
||||
RouterDecorator,
|
||||
@ -38,10 +39,9 @@ const meta: Meta<typeof RecordIndexActionMenuDropdown> = {
|
||||
);
|
||||
|
||||
set(
|
||||
extractComponentState(
|
||||
isDropdownOpenComponentState,
|
||||
'action-menu-dropdown-story-action-menu',
|
||||
),
|
||||
isDropdownOpenComponentStateV2.atomFamily({
|
||||
instanceId: 'action-menu-dropdown-story-action-menu',
|
||||
}),
|
||||
true,
|
||||
);
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user