Text area using variables (#8034)
- Adding multiline props to component - Update design and logic accordingly - Fix hotkey scope for right drawer https://github.com/user-attachments/assets/65ff9641-71a4-4828-a62b-e09327b63150
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
import { useRightDrawer } from '@/ui/layout/right-drawer/hooks/useRightDrawer';
|
||||
import { RightDrawerHotkeyScope } from '@/ui/layout/right-drawer/types/RightDrawerHotkeyScope';
|
||||
import { RightDrawerPages } from '@/ui/layout/right-drawer/types/RightDrawerPages';
|
||||
import { useSetHotkeyScope } from '@/ui/utilities/hotkey/hooks/useSetHotkeyScope';
|
||||
import { workflowCreateStepFromParentStepIdState } from '@/workflow/states/workflowCreateStepFromParentStepIdState';
|
||||
import { useCallback } from 'react';
|
||||
import { useSetRecoilState } from 'recoil';
|
||||
@ -9,6 +11,7 @@ export const useStartNodeCreation = () => {
|
||||
const setWorkflowCreateStepFromParentStepId = useSetRecoilState(
|
||||
workflowCreateStepFromParentStepIdState,
|
||||
);
|
||||
const setHotkeyScope = useSetHotkeyScope();
|
||||
|
||||
/**
|
||||
* This function is used in a context where dependencies shouldn't change much.
|
||||
@ -18,9 +21,10 @@ export const useStartNodeCreation = () => {
|
||||
(parentNodeId: string) => {
|
||||
setWorkflowCreateStepFromParentStepId(parentNodeId);
|
||||
|
||||
setHotkeyScope(RightDrawerHotkeyScope.RightDrawer, { goto: false });
|
||||
openRightDrawer(RightDrawerPages.WorkflowStepSelectAction);
|
||||
},
|
||||
[openRightDrawer, setWorkflowCreateStepFromParentStepId],
|
||||
[openRightDrawer, setWorkflowCreateStepFromParentStepId, setHotkeyScope],
|
||||
);
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user