devextreme-reactive icon indicating copy to clipboard operation
devextreme-reactive copied to clipboard

onSelectionChange: Return the particular row that was selected.

Open bloolizard opened this issue 8 years ago • 2 comments

RE: #373 https://github.com/DevExpress/devextreme-reactive/issues/373#issuecomment-333403255

It would be nice if onChangeSelection, it also gave the particular row that was clicked, not just the array of what is selected. While there are some hack arounds to make this row (e.g. Filter Previous Selected Rows - Current Rows Selected), it would be nice if you guys just returned that row. Maybe just return it as a second parameter?

Use case: Want to manipulate only the row that was clicked and not the others that were selected.

Have found another way of doing this is passing in my own TableRow into the tableRowTemplate prop of TableView as show here but then can't use TableSelection plugin anymore.

bloolizard avatar Oct 02 '17 14:10 bloolizard

Hi,   Thank you for your suggestion. We'll consider implementing this functionality.

kvet avatar Oct 04 '17 08:10 kvet

I'd like to add a plus one here - while it was fairly trivial to add a function to get the difference between the previous and current arrays, it would be nice to have the changed row returned as the second parameter as the OP suggested.

stclairdaniel avatar Dec 11 '17 19:12 stclairdaniel