Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions semcore/data-table/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangel
### Fixed

- Keyboard interaction after mouse clicking in Safari.
- Keyboard interaction after mouse clicking in cell with few interactive elements.

## [16.4.1] - 2025-10-17

Expand Down
6 changes: 6 additions & 0 deletions semcore/data-table/src/components/Body/Cell.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Box, Flex } from '@semcore/base-components';
import { Component, Root, sstyled, createComponent } from '@semcore/core';
import { isFocusInside } from '@semcore/core/lib/utils/focus-lock/isFocusInside';
import { isInteractiveElement } from '@semcore/ui/core/lib/utils/isInteractiveElement';
import * as React from 'react';

import type { CellPropsInner, DataTableCellProps } from './Cell.types';
Expand Down Expand Up @@ -74,6 +75,11 @@ class CellRoot<Data extends DataTableData, UniqKeyType> extends Component<DataTa
handleClickCell = (e: React.SyntheticEvent) => {
const { rowIndex, columnIndex, onClick, row } = this.asProps;

if (isInteractiveElement(e.target) && this.cellRef.current) {
this.lockedCell[0] = this.cellRef.current;
this.lockedCell[1] = true;
}

onClick(e, { rowIndex, colIndex: columnIndex, row });
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ const options = Array(6)
children: `Option ${index}`,
}));

const stopPropagation = (event: React.SyntheticEvent) => {
event.stopPropagation();
};

const CustomSelect = () => {
const [isVisible, setIsVisible] = React.useState(false);
return (
Expand All @@ -35,7 +31,6 @@ const CustomSelect = () => {
e.stopPropagation();
}
}}
onClick={stopPropagation}
/>
);
};
Expand Down
Loading