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

refactor(react-grid): replace render functions with components in TableSelection #502

Merged
merged 14 commits into from
Dec 4, 2017
Merged

refactor(react-grid): replace render functions with components in TableSelection #502

merged 14 commits into from
Dec 4, 2017

Conversation

kvet
Copy link
Contributor

@kvet kvet commented Nov 23, 2017

BREAKING CHANGES:

The TableSelection plugin's highlightSelected property has been renamed to highlightRow. The selectCellTemplate and selectAllCellTemplate properties have been replaced with cellComponent, and headerCellComponent ones, which accept components instead of render functions. Find more details here: #496

Properties passed to headerCellComponent have the same names as arguments passed to the selectAllCellTemplate function with the following exceptions:

  • The onToggle property is used instead of the toggleAll argument.
  • The disabled property is used instead of the selectionAvailable argument and it's value is inverted.

Properties passed to cellComponent have the same names as arguments passed to the selectCellTemplate function except for the onToggle property, which is used instead of the changeSelected argument.

@kvet kvet changed the title [wip]refactor(react-grid): replace render functions with components in TableSelection refactor(react-grid): replace render functions with components in TableSelection Nov 24, 2017
@kvet kvet requested review from SergeyAlexeev and gsobolev and removed request for SergeyAlexeev November 24, 2017 12:00
@kvet kvet requested a review from viterobk November 27, 2017 09:40

### <a name="select-cell-args"></a>SelectCellArgs
### TableSelectCellProps
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, what about the Table prefix?

showSelectAll | boolean | true | If true, the 'select all' checkbox is rendered in the header row.
showSelectionColumn | boolean | true | If true, the selection column (that displays a selection checkboxes) is rendered.
cellComponent | ElementType&lt;[TableSelectCellProps](#tableselectcellprops)&gt; | | A component that renders a selection cell (a cell containing a selection checkbox).
headerCellComponent | ElementType&lt;[TableSelectHeaderellProps](#tableselectcellprops)&gt; | | A component that renders a cell containing the 'Select All' checkbox.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this anchor #tableselectcellprops is wrong. Should be #tableselectheadercellprops.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TableSelectHeaderellProps -> TableSelectHeaderCellProps

@kvet kvet merged commit f9e3c88 into DevExpress:master Dec 4, 2017
@kvet kvet deleted the tableselection-components branch December 4, 2017 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants