DataTable tweaks
Summary: Found a small issue in the column width calculation where initial invisible columns still got space assigned. Reviewed By: passy Differential Revision: D28221659 fbshipit-source-id: ef052533bc37bc833bab72979803ce36bcf50e61
This commit is contained in:
committed by
Facebook GitHub Bot
parent
23402dfff6
commit
84d65b1a77
@@ -443,8 +443,9 @@ function computeInitialColumns(
|
||||
columns: DataTableColumn<any>[],
|
||||
): DataTableColumn<any>[] {
|
||||
const visibleColumnCount = columns.filter((c) => c.visible !== false).length;
|
||||
const columnsWithoutWidth = columns.filter((c) => c.width === undefined)
|
||||
.length;
|
||||
const columnsWithoutWidth = columns.filter(
|
||||
(c) => c.visible !== false && c.width === undefined,
|
||||
).length;
|
||||
|
||||
return columns.map((c) => ({
|
||||
...c,
|
||||
|
||||
Reference in New Issue
Block a user