File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed
components/dash-table/src/dash-table/components Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -123,16 +123,35 @@ export default class HeaderFactory {
123
123
124
124
const ops = this . getHeaderOpCells ( operations , opStyles , headerOpEdges ) ;
125
125
126
+ const filteredStyles = this . filterMergedCells (
127
+ wrapperStyles ,
128
+ labelsAndIndices
129
+ ) ;
130
+
126
131
const headers = this . getHeaderCells (
127
132
wrappers ,
128
133
contents ,
129
- wrapperStyles ,
134
+ filteredStyles ,
130
135
headerEdges
131
136
) ;
132
137
133
138
return this . getCells ( ops , headers ) ;
134
139
}
135
140
141
+ filterMergedCells = memoizeOne ( ( cellsArray , labelsAndIndices ) => {
142
+ const filteredCells = [ ] ;
143
+ for ( let row = 0 ; row < cellsArray . length ; row ++ ) {
144
+ const rowCells = [ ] ;
145
+ for ( let col = 0 ; col < cellsArray [ row ] . length ; col ++ ) {
146
+ if ( labelsAndIndices [ row ] [ 1 ] . includes ( col ) ) {
147
+ rowCells . push ( cellsArray [ row ] [ col ] ) ;
148
+ }
149
+ }
150
+ filteredCells . push ( rowCells ) ;
151
+ }
152
+ return filteredCells ;
153
+ } ) ;
154
+
136
155
getCells = memoizeOne (
137
156
( opCells : JSX . Element [ ] [ ] , dataCells : JSX . Element [ ] [ ] ) =>
138
157
arrayMap2 ( opCells , dataCells , ( o , c ) =>
You can’t perform that action at this time.
0 commit comments