fix multi-select

This commit is contained in:
Philipinho
2026-06-26 11:54:21 +01:00
parent d469558c1e
commit ccf61f3f84
@@ -94,21 +94,21 @@ export const GridCell = memo(function GridCell({
const handleMouseDown = useCallback( const handleMouseDown = useCallback(
(e: React.MouseEvent<HTMLDivElement>) => { (e: React.MouseEvent<HTMLDivElement>) => {
if (!property || e.button !== 0) return; if (!property || e.button !== 0 || isEditing) return;
setFocusedCell({ rowId, propertyId: property.id }); setFocusedCell({ rowId, propertyId: property.id });
}, },
[property, rowId, setFocusedCell], [property, rowId, setFocusedCell, isEditing],
); );
const handleClick = useCallback( const handleClick = useCallback(
(e: React.MouseEvent<HTMLDivElement>) => { (e: React.MouseEvent<HTMLDivElement>) => {
if (!property) return; if (!property || isEditing) return;
setFocusedCell({ rowId, propertyId: property.id }); setFocusedCell({ rowId, propertyId: property.id });
(e.currentTarget.closest('[role="grid"]') as HTMLElement | null)?.focus({ (e.currentTarget.closest('[role="grid"]') as HTMLElement | null)?.focus({
preventScroll: true, preventScroll: true,
}); });
}, },
[property, rowId, setFocusedCell], [property, rowId, setFocusedCell, isEditing],
); );
const cellReadOnly = property const cellReadOnly = property