Skip to content

Commit

Permalink
Fix primefaces#5384: TreeTable support hidden columns
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Nov 24, 2023
1 parent c3ee3c1 commit bb9074c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/lib/treetable/TreeTableHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,10 @@ export const TreeTableHeader = React.memo((props) => {
const createHeaderCell = (column, options) => {
let filterElement;

if (getColumnProp(column, 'hidden')) {
return null;
}

if (getColumnProp(column, 'filter') && options.renderFilter) {
filterElement = getColumnProp(column, 'filterElement') || (
<InputText
Expand Down
4 changes: 4 additions & 0 deletions components/lib/treetable/TreeTableRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,10 @@ export const TreeTableRow = React.memo((props) => {
const createCell = (column, index) => {
let toggler, checkbox;

if (getColumnProp(column, 'hidden')) {
return null;
}

if (getColumnProp(column, 'expander')) {
toggler = createToggler(column);
checkbox = createCheckbox(column);
Expand Down

0 comments on commit bb9074c

Please sign in to comment.