-
Notifications
You must be signed in to change notification settings - Fork 66
Add support for selecting rows in table #61
Comments
The way I read this is that the user dictates single / multiselect... it should be controlled by the developer, not the user. I think there should be something about enabling / disabling multirow selection within the opening |
Don't you think this might be confusing and could lead to two tables being implemented differently in different applications offering users different user experiences? Is there perhaps an office application that uses tables that we could take a look at to see how it's working? |
I think the following when it comes into row selecting:
I think that's intuitive and simple. I have also found grid implementation for Angular Material - md-data-grid - it looks like there it is defined per row (eg. with ng-repeat) whether the row is selectable. |
@waldekmastykarz I don't think it would be confusing... sure the two tables might behave differently on selection, but how is that any different from a single / multi select dropdown control? It isn't. It's worse if I as the developer have to keep unselecting something because the user selected a row already and I only allow for them to select one. |
Support for both single- and multiselect scenarios would be useful indeed. What if we would do it this way:
I've had a look at it and saw that this is how table is implemented in OneDrive. What do you say we chose the same approach? |
... and if you don't want any selection, you don't use the |
In my suggestion I assumed that |
IMHO I think no selection (and just use the table for displaying data) should be the default. Then have options for selecting. Maybe a |
For |
I agree with both points. |
LGTM... BTW I'm not against shipping CSS in our library if its warranted for anything. The only concern I have with an inline style is if someone would want to change the cursor. If they did, there's really no way to do that with an inline style. |
@andrewconnell good point. How about we go with inline styles initially and see if anyone raises it as a blocking issue for their scenario? If they do we could always change it to use external styles. |
works for me |
👍 |
Based on the previous discussions I've updated the specs in the first comment |
WOW... that's a lot of checkboxes... you sure your next control isn't going to be #16 ? 😏 |
;)
|
Looking at the number of these checkboxes, who would've thought implementing row selection in a table would be so complex ;-) |
Added support to select rows within the table. Added attribute validation and error logging to the console to address directive guidelines [#7](https://github.com/ngOfficeUIFabric/ng-officeuifabric/blob/master/docs/guides/DIRECTIVE-CHECKLIST.md#directive-attribute-validation) & [#8](https://github.com/ngOfficeUIFabric/ng-officeuifabric/blob/master/docs/guides/DIRECTIVE-CHECKLIST.md#error-messages). Closes #61. Closes #101. Closes #115.
Added support to select rows within the table. Added attribute validation and error logging to the console to address directive guidelines [#7](https://github.com/ngOfficeUIFabric/ng-officeuifabric/blob/master/docs/guides/DIRECTIVE-CHECKLIST.md#directive-attribute-validation) & [#8](https://github.com/ngOfficeUIFabric/ng-officeuifabric/blob/master/docs/guides/DIRECTIVE-CHECKLIST.md#error-messages). Closes #61. Closes #101. Closes #115.
Added support to select rows within the table. Added attribute validation and error logging to the console to address directive guidelines [007](https://github.com/ngOfficeUIFabric/ng-officeuifabric/blob/master/docs/guides/DIRECTIVE-CHECKLIST.md#directive-attribute-validation) & [008](https://github.com/ngOfficeUIFabric/ng-officeuifabric/blob/master/docs/guides/DIRECTIVE-CHECKLIST.md#error-messages). Closes #61. Closes #101. Closes #115.
Extend table with support for sorting using the following specs:
uif-row-select-mode
attribute on theuif-table
directivetable.selectedItems
propertyuif-row-select-mode="none"
:uif-table-row-select
directive doesn't do anythinguif-row-select-mode="single"
:uif-table-row-select
directive in the header row doesn't do anythinguif-table-row-select
directive in regular rows has the same effect as clicking on the rowuif-row-select-mode="multiple"
:allRowsSelected
property on the table scope tofalse
~~uif-table-row-select
directive in the header row selects all rowsuif-table-row-select
directive in the header row deselects all rowsThe text was updated successfully, but these errors were encountered: