mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
fix(dashboard): Allow selecting text in cells in Table and PivotTable without triggering cross filters (#23283)
This commit is contained in:
committed by
GitHub
parent
1b139d0748
commit
d16512b775
@@ -41,6 +41,7 @@ import {
|
||||
DTTM_ALIAS,
|
||||
ensureIsArray,
|
||||
GenericDataType,
|
||||
getSelectedText,
|
||||
getTimeFormatterForGranularity,
|
||||
BinaryQueryObjectFilterClause,
|
||||
styled,
|
||||
@@ -493,7 +494,12 @@ export default function TableChart<D extends DataRecord = DataRecord>(
|
||||
title: typeof value === 'number' ? String(value) : undefined,
|
||||
onClick:
|
||||
emitCrossFilters && !valueRange && !isMetric
|
||||
? () => toggleFilter(key, value)
|
||||
? () => {
|
||||
// allow selecting text in a cell
|
||||
if (!getSelectedText()) {
|
||||
toggleFilter(key, value);
|
||||
}
|
||||
}
|
||||
: undefined,
|
||||
onContextMenu: (e: MouseEvent) => {
|
||||
if (handleContextMenu) {
|
||||
|
||||
Reference in New Issue
Block a user