### What problem does this PR solve? feat: click on a blank area of the canvas to hide the form drawer #918 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@@ -62,6 +62,10 @@ function FlowCanvas({ chatDrawerVisible, hideChatDrawer }: IProps) {
|
||||
[showDrawer],
|
||||
);
|
||||
|
||||
const onPaneClick = useCallback(() => {
|
||||
hideDrawer();
|
||||
}, [hideDrawer]);
|
||||
|
||||
const { onDrop, onDragOver, setReactFlowInstance } = useHandleDrop();
|
||||
|
||||
const { handleKeyUp } = useHandleKeyUp();
|
||||
@@ -101,6 +105,7 @@ function FlowCanvas({ chatDrawerVisible, hideChatDrawer }: IProps) {
|
||||
onDrop={onDrop}
|
||||
onDragOver={onDragOver}
|
||||
onNodeClick={onNodeClick}
|
||||
onPaneClick={onPaneClick}
|
||||
onInit={setReactFlowInstance}
|
||||
onKeyUp={handleKeyUp}
|
||||
onSelectionChange={onSelectionChange}
|
||||
|
||||
Reference in New Issue
Block a user