Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.

Commit 775f49e

Browse files
author
Shammamah Hossain
committed
Make selectors for tables more specific.
1 parent d33210e commit 775f49e

File tree

1 file changed

+3
-2
lines changed
  • src/dash-table/components/ControlledTable

1 file changed

+3
-2
lines changed

src/dash-table/components/ControlledTable/index.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ export default class ControlledTable extends PureComponent<ControlledTableProps>
668668

669669
// Adjust the width of the fixed row header
670670
if (fixed_rows) {
671-
Array.from(r1c1.querySelectorAll('tr:first-of-type td, tr:first-of-type th')).forEach((td, index) => {
671+
Array.from(r1c1.querySelectorAll('tr:first-of-type td.dash-cell, tr:first-of-type th.dash-header')).forEach((td, index) => {
672672
const style = getComputedStyle(td);
673673
const width = style.width;
674674

@@ -681,7 +681,7 @@ export default class ControlledTable extends PureComponent<ControlledTableProps>
681681

682682
// Adjust the width of the fixed row / fixed columns header
683683
if (fixed_columns && fixed_rows) {
684-
Array.from(r1c0.querySelectorAll('tr:first-of-type td, tr:first-of-type th')).forEach((td, index) => {
684+
Array.from(r1c0.querySelectorAll('tr:first-of-type td.dash-cell, tr:first-of-type th.dash-header')).forEach((td, index) => {
685685
const style = getComputedStyle(td);
686686
const width = style.width;
687687

@@ -691,6 +691,7 @@ export default class ControlledTable extends PureComponent<ControlledTableProps>
691691
);
692692
});
693693
}
694+
694695
}
695696

696697
handleDropdown = () => {

0 commit comments

Comments
 (0)