fix(dashboard): Allow selecting text in cells in Table and PivotTable without triggering cross filters (#23283)

This commit is contained in:
Kamil Gabryjelski
2023-03-06 13:42:52 +01:00
committed by GitHub
parent 1b139d0748
commit d16512b775
5 changed files with 67 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ import {
isAdhocColumn,
BinaryQueryObjectFilterClause,
t,
getSelectedText,
} from '@superset-ui/core';
import { PivotTable, sortAs, aggregatorTemplates } from './react-pivottable';
import {
@@ -356,6 +357,11 @@ export default function PivotTableChart(props: PivotTableProps) {
return;
}
// allow selecting text in a cell
if (getSelectedText()) {
return;
}
const isActiveFilterValue = (key: string, val: DataRecordValue) =>
!!selectedFilters && selectedFilters[key]?.includes(val);