Skip to content

Commit

Permalink
Fixed #2553 - Added column property for cellClassName function
Browse files Browse the repository at this point in the history
  • Loading branch information
mcandu committed Dec 28, 2021
1 parent 30c6b0c commit d99c4c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion components/lib/datatable/BodyCell.js
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ export class BodyCell extends Component {
const editor = this.getColumnProp('editor');
const frozen = this.getColumnProp('frozen');
const value = this.resolveFieldData();
const cellClassName = ObjectUtils.getPropValue(this.props.cellClassName, value, { props: this.props.tableProps, rowData: this.props.rowData });
const cellClassName = ObjectUtils.getPropValue(this.props.cellClassName, value, { props: this.props, rowData: this.props.rowData, column: this.props.column });
const className = classNames(this.getColumnProp('bodyClassName'), this.getColumnProp('class'), cellClassName, {
'p-selection-column': selectionMode !== null,
'p-editable-column': editor,
Expand Down
1 change: 1 addition & 0 deletions components/lib/datatable/DataTable.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ interface DataTableRowClassNameOptions {
interface DataTableCellClassNameOptions {
props: DataTableProps;
rowData: any;
column: Column;
}

interface DataTableShowSelectionElementOptions {
Expand Down

0 comments on commit d99c4c9

Please sign in to comment.