mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
refactor(core-app): CB-1239 remove duplicated logic
This commit is contained in:
+3
-7
@@ -46,11 +46,7 @@ export const NavigationNodeEditor = observer<Props>(function NavigationNodeEdito
|
||||
}
|
||||
}, [name, onClose, node, loading, navTreeResource, notificationService]);
|
||||
|
||||
const handleClick = (event: React.MouseEvent<HTMLDivElement>) => {
|
||||
EventContext.set(event, EventStopPropagationFlag);
|
||||
};
|
||||
|
||||
const handleDbClick = (event: React.MouseEvent<HTMLDivElement>) => {
|
||||
const stopPropagation = (event: React.MouseEvent<HTMLDivElement>) => {
|
||||
EventContext.set(event, EventStopPropagationFlag);
|
||||
};
|
||||
|
||||
@@ -64,8 +60,8 @@ export const NavigationNodeEditor = observer<Props>(function NavigationNodeEdito
|
||||
onSave={save}
|
||||
onReject={onClose}
|
||||
onBlur={onClose}
|
||||
onClick={handleClick}
|
||||
onDoubleClick={handleDbClick}
|
||||
onClick={stopPropagation}
|
||||
onDoubleClick={stopPropagation}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user