Skip to content

Commit

Permalink
Fix primefaces#3470: Datatable custom restore state column fix
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Oct 11, 2022
1 parent f11d095 commit 5fc104f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion components/lib/datatable/DataTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,12 @@ export const DataTable = React.forwardRef((props, ref) => {
if (props.resizableColumns) {
columnWidthsState.current = restoredState.columnWidths;
tableWidthState.current = restoredState.tableWidth;
restoreColumnWidths();

const isCustom = props.customRestoreState && isCustomStateStorage();

if (!isCustom) {
restoreColumnWidths();
}
}

if (props.reorderableColumns) {
Expand Down

0 comments on commit 5fc104f

Please sign in to comment.