mui-datatables icon indicating copy to clipboard operation
mui-datatables copied to clipboard

Feature Request: Selectable Rows

Open codyjroberts opened this issue 8 years ago • 7 comments

As far as I can tell there isn't an interface to access rows or bind actions to them. Any plans on implementing this?

Thanks for your work on this!

codyjroberts avatar Feb 15 '18 15:02 codyjroberts

@codyjroberts Thanks for the feedback! No plans as of now but I can throw this request on the feature board

gregnb avatar Feb 16 '18 01:02 gregnb

Hey @codyjroberts so I'm going to start working on this feature next. Just some product based questions first, though. So, after exploring around I'm wondering what is the use case on selectable rows? So far, I'm just seeing datatable examples out there that allow you to select rows and then delete them. I was wondering what would you do if given the feature?

Are there any cool things I could be missing? I was thinking when you start selecting rows up top in the toolbar area I would then show how many rows are selected (much like how mui demo table works today) and then for options on what you can do with this data: delete and maybe export?

How you mentioned bind actions. So, what would you have in mind?

gregnb avatar Mar 23 '18 13:03 gregnb

So PR #21 is close to being finished. So far, I've added the following callbacks: onRowsSelect and onRowsDelete.

Wish I had some more ideas for useful options in the toolbar above. For now, just a delete function.

screen shot 2018-03-27 at 10 14 55 pm

screen shot 2018-03-27 at 10 15 19 pm

gregnb avatar Mar 28 '18 02:03 gregnb

Version 1.1.2 now has this feature added

gregnb avatar Mar 28 '18 18:03 gregnb

@gregnb I have a use for something like this. Currently we are working on a delivery management system, and we would like to be able to select rows and then run a function that would bulk edit a cell in a column. For example we would want to remove a booking date, but not actually remove the record.

Is that already possible?

NickToye avatar Aug 09 '18 13:08 NickToye

it's possible to add custom icons+funtions to the select row function? not only the delete one. I would like to be able to do something like this

mass_actions_example

mass actions like, send email, or edit...

JesusADS avatar Mar 20 '19 15:03 JesusADS

@JesusADS I've opened #544 to allow for custom delete icons

jakesylvestre avatar Apr 07 '19 15:04 jakesylvestre