fix(dashboard): fix Pivot Table V2 dragPreview in the dashboard (#21539)

This commit is contained in:
Stephen Liu
2022-09-28 22:10:38 +08:00
committed by GitHub
parent 60bab4269f
commit ab53d77aba
2 changed files with 9 additions and 5 deletions

View File

@@ -826,6 +826,10 @@ export class TableRenderer extends React.Component {
);
}
isDashboardEditMode() {
return document.contains(document.querySelector('.dashboard--editing'));
}
render() {
if (this.cachedProps !== this.props) {
this.cachedProps = this.props;
@@ -867,7 +871,7 @@ export class TableRenderer extends React.Component {
};
return (
<Styles>
<Styles isDashboardEditMode={this.isDashboardEditMode()}>
<table className="pvtTable" role="grid">
<thead>
{colAttrs.map((c, j) =>