Fix columnSize prop

Summary: I added column size persistence when resizing manually, but broke initial column sizing when a prop is provided. This fixes it.

Reviewed By: passy

Differential Revision: D15392145

fbshipit-source-id: 53f79c520917cd571302502c8b75aa0475567cb9
This commit is contained in:
John Knox
2019-05-17 06:21:38 -07:00
committed by Facebook Github Bot
parent 89ebb11520
commit d85a357428

View File

@@ -178,7 +178,7 @@ class ManagedTable extends React.Component<
columnSizes: columnSizes:
this.props.tableKey && globalTableState[this.props.tableKey] this.props.tableKey && globalTableState[this.props.tableKey]
? globalTableState[this.props.tableKey] ? globalTableState[this.props.tableKey]
: {}, : this.props.columnSizes || {},
highlightedRows: this.props.highlightedRows || new Set(), highlightedRows: this.props.highlightedRows || new Set(),
sortOrder: this.props.initialSortOrder || null, sortOrder: this.props.initialSortOrder || null,
shouldScrollToBottom: Boolean(this.props.stickyBottom), shouldScrollToBottom: Boolean(this.props.stickyBottom),