Skip to content

Commit

Permalink
Fix #2889: TreeTable resizable per column (#2890)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored May 13, 2022
1 parent c28a05a commit 7121122
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/lib/treetable/TreeTableHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ export const TreeTableHeader = React.memo((props) => {
}
}

const getColumnProp = (...args) => {
return props.column ? typeof args[0] === 'string' ? props.column.props[args[0]] : (args[0] || props.column).props[args[1]] : null;
const getColumnProp = (column, ...args) => {
return column ? typeof args[0] === 'string' ? column.props[args[0]] : (args[0] || column).props[args[1]] : null;
}

const createSortIcon = (column, sorted, sortOrder) => {
Expand Down Expand Up @@ -215,7 +215,7 @@ export const TreeTableHeader = React.memo((props) => {
const className = classNames(column.props.headerClassName || column.props.className, {
'p-sortable-column': column.props.sortable,
'p-highlight': sorted,
'p-resizable-column': props.resizableColumns && getColumnProp('resizeable')
'p-resizable-column': props.resizableColumns && getColumnProp(column, 'resizeable')
});

const resizer = createResizer(column);
Expand Down

0 comments on commit 7121122

Please sign in to comment.