Skip to content

Commit

Permalink
Fixed #1366 - TreeTable column body prop function does not contain co…
Browse files Browse the repository at this point in the history
…lumn argument
  • Loading branch information
mertsincan committed Jun 4, 2020
1 parent 2cc9a8b commit 34fc584
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/components/treetable/TreeTableBodyCell.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import ObjectUtils from '../utils/ObjectUtils';
import DomHandler from '../utils/DomHandler';

export class TreeTableBodyCell extends Component {

constructor(props) {
super(props);

Expand All @@ -22,7 +22,7 @@ export class TreeTableBodyCell extends Component {
this.setState({
editing: true
});

if(this.documentEditListener)
this.cellClick = true;
else
Expand All @@ -42,10 +42,10 @@ export class TreeTableBodyCell extends Component {
if(!this.cellClick) {
this.switchCellToViewMode();
}

this.cellClick = false;
};

document.addEventListener('click', this.documentEditListener);
}
}
Expand Down Expand Up @@ -88,7 +88,7 @@ export class TreeTableBodyCell extends Component {
focusable.setAttribute('data-isCellEditing', true);
focusable.focus();
}

this.keyHelper.tabIndex = -1;
}
else {
Expand All @@ -97,7 +97,7 @@ export class TreeTableBodyCell extends Component {
this.keyHelper.removeAttribute('tabindex');
}
}, 50);
}
}
}
}

Expand All @@ -117,7 +117,7 @@ export class TreeTableBodyCell extends Component {
}
else {
if (this.props.body)
content = this.props.body(this.props.node, this.props.column);
content = this.props.body(this.props.node, this.props);
else
content = ObjectUtils.resolveFieldData(this.props.node.data, this.props.field);
}
Expand All @@ -134,4 +134,4 @@ export class TreeTableBodyCell extends Component {
</td>
);
}
}
}

0 comments on commit 34fc584

Please sign in to comment.