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

Adds info about DataTable row selection #527

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mperrotti
Copy link
Contributor

The content is ready for review, but the screen recordings for the example videos are not ready yet. Screen recordings will be created once the DataTable component supports selection.

Copy link
Contributor

@ericwbailey ericwbailey left a comment

Choose a reason for hiding this comment

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

A couple of tiny nits, but nothing that would get in the way of merging. Awesome stuff!


{/* ![Video of DataTable with row selection. The first 3 rows are selected, and the select-all checkbox is in an indeterminate state. The header changes to show the batch row actions when one or more rows are selected.]() */}

A data table component can support the ability to have one or more rows selected. A batch of selected rows can then have actions applied to them.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
A data table component can support the ability to have one or more rows selected. A batch of selected rows can then have actions applied to them.
A DataTable component can support the ability to have one or more rows selected. A batch of selected rows can then have actions applied to them.

Comment on lines +572 to +573
If the data table is paginated, the "Select all rows" checkbox is activated, all rows on the currently displayed page are selected. Rows on pages that are not the currently displayed will **not** be selected.
For example, consider a paginated data table that displays 25 rows per page, with a total of 400 rows in the table. All rows on the current page are selected by the user. Deleting the selected rows should remove only the displayed rows, as to avoid unintentionally applying a destructive act to the other 375 rows.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
If the data table is paginated, the "Select all rows" checkbox is activated, all rows on the currently displayed page are selected. Rows on pages that are not the currently displayed will **not** be selected.
For example, consider a paginated data table that displays 25 rows per page, with a total of 400 rows in the table. All rows on the current page are selected by the user. Deleting the selected rows should remove only the displayed rows, as to avoid unintentionally applying a destructive act to the other 375 rows.
If the DataTable is paginated, the "Select all rows" checkbox is activated, all rows on the currently displayed page are selected. Rows on pages that are not the currently displayed will **not** be selected.
For example, consider a paginated DataTable that displays 25 rows per page, with a total of 400 rows in the table. All rows on the current page are selected by the user. Deleting the selected rows should remove only the displayed rows, as to avoid unintentionally applying a destructive act to the other 375 rows.

If the data table is paginated, the "Select all rows" checkbox is activated, all rows on the currently displayed page are selected. Rows on pages that are not the currently displayed will **not** be selected.
For example, consider a paginated data table that displays 25 rows per page, with a total of 400 rows in the table. All rows on the current page are selected by the user. Deleting the selected rows should remove only the displayed rows, as to avoid unintentionally applying a destructive act to the other 375 rows.

A selected row's state **does not** persist if another page is requested. For example, consider a data table component that displays 15 rows per page. On page two, a user selects row 21, and then requests page one. Row 21's selected state is changed to deselected after page one's content is displayed.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
A selected row's state **does not** persist if another page is requested. For example, consider a data table component that displays 15 rows per page. On page two, a user selects row 21, and then requests page one. Row 21's selected state is changed to deselected after page one's content is displayed.
A selected row's state **does not** persist if another page is requested. For example, consider a DataTable component that displays 15 rows per page. On page two, a user selects row 21, and then requests page one. Row 21's selected state is changed to deselected after page one's content is displayed.

@mperrotti
Copy link
Contributor Author

I completely forgot I opened this PR. Will come back to it and get it merged this week 😅

@mperrotti
Copy link
Contributor Author

I'm waiting for the implementation to be done before getting this merged.

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.

2 participants