microsoft / powercat-creator-kit

This toolkit helps create well-designed Power App experiences on the web & mobile. It contains a component library; PCF controls and other utilities that increase developer productivity.
MIT License
312 stars 51 forks source link

[Documentation]: Update docs to include select/deselect behaviour for Details List #395

Open manuelap-msft opened 1 year ago

manuelap-msft commented 1 year ago

Is this request for a new component, or additional functionality for an existing component? Existing component, DetailsList

Have you validated that your desired feature or component is not already in the backlog? Yes

Describe the component and functionality you would like to see in the starter kit Could the Details List documentation be updated with an example of how to handle de-select events on a DetailsList (e.g. on select add something to a collection, on remove remove something from a collection). Both Paging as well as Search on the DetailsList clears the components SelectedItems so quite often you need to maintain what's been selected in a collection, and an example of how to do that would be great to have in the documentation.

Describe alternatives you've considered Trying to figure it out through trial and error.

sperry1625 commented 1 year ago

In addition, selections in general. I have a column in my collection, IsSelected, to have the ability to programmatically select a row. But I would like to update that column to reflect a change by the user, if they select a new row. The problem is when I try and update the underlying collection based on what the user selected, it causes the OnRowSelectionChange to get called over and over and then the list, even though a row is selected, the List.Selection property is Blank(). So now I have no isea what is selected.