ratiw / vuetable-2

data table simplify! -- datatable component for Vue 2.x. See documentation at
https://vuetable.com
MIT License
2.16k stars 399 forks source link

Single Select #156

Open lgullestrup opened 7 years ago

lgullestrup commented 7 years ago

Great plugin,

looks like it is only getting better!

are there plans to implement 'Single Select'?

or should this be handled outside of the vuetable?

ratiw commented 7 years ago

@lgullestrup Thanks. What do yo mean by "Single Select" though?

lgullestrup commented 7 years ago

When i mean single select, i mean that only one record can be 'selected' at a time. When you select a second record, the first selection is cleared before the second one is selected.

what would be the best way to manipulate the way rows are 'selected' i know you can hook into the row-clicked event, would you then manipulate the selectedTo prop?

ratiw commented 7 years ago

@lgullestrup That is exactly what I would do. Since, you wouldn't want to use __checkbox, selectedTo can be used for that purpose.

It is flexible enough to support both single and multi-select logic. Using row-class function to return appropriate class base on your intended logic will create that appearance of single or multi select.