mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
fix: preserve correct column order when table layout is changed with time comparison enabled (#34300)
This commit is contained in:
@@ -629,7 +629,11 @@ export default function TableChart<D extends DataRecord = DataRecord>(
|
||||
const startPosition = value[0];
|
||||
const colSpan = value.length;
|
||||
// Retrieve the originalLabel from the first column in this group
|
||||
const originalLabel = columnsMeta[value[0]]?.originalLabel || key;
|
||||
const firstColumnInGroup = filteredColumnsMeta[startPosition];
|
||||
const originalLabel = firstColumnInGroup
|
||||
? columnsMeta.find(col => col.key === firstColumnInGroup.key)
|
||||
?.originalLabel || key
|
||||
: key;
|
||||
|
||||
// Add placeholder <th> for columns before this header
|
||||
for (let i = currentColumnIndex; i < startPosition; i += 1) {
|
||||
|
||||
Reference in New Issue
Block a user