mirror of
https://github.com/docmost/docmost.git
synced 2026-07-11 21:14:44 +10:00
fix multi-select
This commit is contained in:
@@ -94,21 +94,21 @@ export const GridCell = memo(function GridCell({
|
||||
|
||||
const handleMouseDown = useCallback(
|
||||
(e: React.MouseEvent<HTMLDivElement>) => {
|
||||
if (!property || e.button !== 0) return;
|
||||
if (!property || e.button !== 0 || isEditing) return;
|
||||
setFocusedCell({ rowId, propertyId: property.id });
|
||||
},
|
||||
[property, rowId, setFocusedCell],
|
||||
[property, rowId, setFocusedCell, isEditing],
|
||||
);
|
||||
|
||||
const handleClick = useCallback(
|
||||
(e: React.MouseEvent<HTMLDivElement>) => {
|
||||
if (!property) return;
|
||||
if (!property || isEditing) return;
|
||||
setFocusedCell({ rowId, propertyId: property.id });
|
||||
(e.currentTarget.closest('[role="grid"]') as HTMLElement | null)?.focus({
|
||||
preventScroll: true,
|
||||
});
|
||||
},
|
||||
[property, rowId, setFocusedCell],
|
||||
[property, rowId, setFocusedCell, isEditing],
|
||||
);
|
||||
|
||||
const cellReadOnly = property
|
||||
|
||||
Reference in New Issue
Block a user