igniteui-angular icon indicating copy to clipboard operation
igniteui-angular copied to clipboard

igxGrid row selection

Open Lipata opened this issue 8 years ago • 8 comments

Implement row selection in igxGrid.

Research

Development

  • [x] POC polish
  • [x] Create row selection
  • [x] Create header checkbox selection
  • [x] Change cell selection
  • [x] Filtering integration
  • [x] Paging integration
  • [x] Sorting integration
  • [x] Pinning integration
  • [x] Aria Support
  • [x] Keyboard Navigation
  • [x] API according to spec
  • [x] Styling & UI implementation
  • [x] Unit tests

Documentation

  • [x] ReadMe
  • [x] DocFX
  • [x] Sample creation
  • [x] Changelog update

Links

  • development branch (https://github.com/IgniteUI/igniteui-angular/tree/nalipiev/row-selection)
  • specification (https://github.com/IgniteUI/igniteui-angular/wiki/Row-Selection-(Grid-feature))

Lipata avatar Mar 22 '18 11:03 Lipata

@SDinev and @StefanIvanov Hi guys we need a design for this one if we have it please include it in the spec.

SlavUI avatar Mar 22 '18 12:03 SlavUI

"the only mode of selection will be multiple"

Does this mean it's not possible to force selection of a single row? This seems like a huge limitation if it's the case. What is the reasoning behind this? At least in our solution it's vastly more common to only select a single row at a time. So we will basically have to monitor selection and deselect manually if we want to force single row selection?

Eralmidia avatar Mar 23 '18 11:03 Eralmidia

@Eralmidia The igx-grid should support selection of one or more rows. I don't think there will be a limitation on selecting a single row.

SlavUI avatar Mar 23 '18 11:03 SlavUI

Hi, @Eralmidia. This specification is still an initial one, and any matter is a matter of discussion. Thank you for your question and for sure it will be taken in account. The idea of that is to have an easy configuration of the row selection feature and in the same time to cover most of the user cases. Of course our API will support events and methods that will easily allow you to turn the default multiple selection into single one. It will just not happen through the grid option. We will propose event, which you will be able to handle and inside to call a method that will deselect all the current selected rows. This is something we will also provide to the customers. The basic idea behind this is to keep the things simple - this will also lead to a fewer future problems of the control.

Lipata avatar Mar 23 '18 11:03 Lipata

I see. Keeping it simple is of course a good thing, and I guess it's not a big deal whether its through an event or an option, as long as this is well documented and doesn't increase complexity in development. I imagine this will be a very common use case. I'm sure we have more than 100 ig grids in our solution, and that more than 90% of them uses single row selection.

Eralmidia avatar Mar 23 '18 12:03 Eralmidia

@kdinev can you check the feature API in the specifications? Thank you!

Lipata avatar Mar 27 '18 15:03 Lipata

@Lipata I looked at the APIs. Since we decided we're going to identify the selected rows by their data members, rather than the IgxRowComponent because only the row components in the virtual page are available at the time of calling the API, the suggested API is no longer applicable. Please update the suggested APIs and I'll review.

kdinev avatar Mar 28 '18 08:03 kdinev

@kdinev I've updated the specification. I've added grid methods that will work with row identifiers that are either primaryKey or rowData. I left the grid methods that will still accept row components as parameters. The idea is to use them to mimic the user row selection that is happening on visible rows. We still have getRowByIndex method that returns a row component. I'm not sure which is the best, but if we still have the getRowByIndex method, then we may leave the selection methods that work with row component.

Lipata avatar Apr 02 '18 14:04 Lipata