Skip to content
Snippets Groups Projects
Unverified Commit 3e57230b authored by Alexander Polyankin's avatar Alexander Polyankin Committed by GitHub
Browse files

Fix table cells (#35148)

parent 6d8c4a3e
No related branches found
No related tags found
No related merge requests found
......@@ -522,8 +522,7 @@ class TableInteractive extends Component {
);
const isLink = cellData && cellData.type === ExternalLink;
const isClickable =
!isLink && !isScrolling && this.visualizationIsClickable(clicked);
const isClickable = !isLink && !isScrolling;
const backgroundColor = this.getCellBackgroundColor(
settings,
value,
......@@ -533,6 +532,22 @@ class TableInteractive extends Component {
const isCollapsed = this.isColumnWidthTruncated(columnIndex);
const handleClick = e => {
if (!isClickable || !this.visualizationIsClickable(clicked)) {
return;
}
this.onVisualizationClick(clicked, e.currentTarget);
};
const handleKeyUp = e => {
if (!isClickable || !this.visualizationIsClickable(clicked)) {
return;
}
if (e.key === "Enter") {
this.onVisualizationClick(clicked, e.currentTarget);
}
};
return (
<div
key={key}
......@@ -560,21 +575,8 @@ class TableInteractive extends Component {
link: isClickable && isID(column),
},
)}
onClick={
isClickable
? e => {
this.onVisualizationClick(clicked, e.currentTarget);
}
: undefined
}
onKeyUp={
isClickable
? e => {
e.key === "Enter" &&
this.onVisualizationClick(clicked, e.currentTarget);
}
: undefined
}
onClick={handleClick}
onKeyUp={handleKeyUp}
onMouseEnter={
showDetailShortcut ? e => this.handleHoverRow(e, rowIndex) : undefined
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment