Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: #962 Wrong documentation '- if formatter is specified, renderCell is ign... #963

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/components/core-components/Grid.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,5 +188,5 @@ Property | Description
`get(item)` | An optional function that, given a data item, will return the value to render in the cell.
`set(item)` | An optional function that, given a modified data item, will return the value to set for the respective field on that item upon a call to `save()`. If no value is returned, the value as set in the passed item will be used. (Modifying the passed item directly is thus also an option.)
`formatter(value)` | An optional function that, given the value to be displayed, will return a string of HTML for rendering. If `formatterScope` is used, this can be a string instead of a function, in which case a function will be looked up on the `formatterScope` object using the given string.
`renderCell(object, value, node, options)` | An optional function that will be called to render the value into the target cell. `object` refers to the record from the grid’s store for the row, and `value` refers to the specific value for the current cell (which may have been modified by the column definition’s `get` function). `node` refers to the table cell that will be placed in the grid if nothing is returned by `renderCell`; if `renderCell` returns a node, that returned node will be placed in the grid instead. (Note: if `formatter` is specified, `renderCell` is ignored.)
`renderCell(object, value, node, options)` | An optional function that will be called to render the value into the target cell. `object` refers to the record from the grid’s store for the row, and `value` refers to the specific value for the current cell (which may have been modified by the column definition’s `get` function). `node` refers to the table cell that will be placed in the grid if nothing is returned by `renderCell`; if `renderCell` returns a node, that returned node will be placed in the grid instead. (Note: if `renderCell` is specified, `formatter` is ignored.)
`renderHeaderCell(node)` | An optional function that will be called to render the column's header cell. Like `renderCell`, this may either operate on the node directly, or return a node to be placed within it.