Components getting selected while resizing query panel fix (#2494)

This commit is contained in:
Shaurya Sharma 2024-10-25 12:42:38 +05:30 committed by Shaurya Sharma
parent 910a2b5917
commit b93e843a5e

View file

@ -76,9 +76,13 @@ export const QueryPanel = ({ darkMode }) => {
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [windowSize.height, isExpanded, isWindowResizing]);
const onMouseDown = useCallback(() => {
if (isTopOfQueryPanel) setIsDraggingQueryPane(true);
}, [isTopOfQueryPanel]);
const onMouseDown = useCallback(
(e) => {
e.preventDefault();
if (isTopOfQueryPanel) setIsDraggingQueryPane(true);
},
[isTopOfQueryPanel]
);
const onMouseUp = useCallback((e) => {
setIsDraggingQueryPane(false);