daybrush / selecto

Selecto.js is a component that allows you to select elements in the drag area using the mouse or touch.
https://daybrush.com/selecto
MIT License
2.04k stars 82 forks source link

Can it be changed to a controlled component #105

Open mtiger95 opened 1 year ago

mtiger95 commented 1 year ago

Can it be changed to a controlled component? Check the number of elements that have been given the class name' selected' before clicking and triggering.

daybrush commented 1 year ago

@mtiger95

what you're saying is like this

https://daybrush.com/selecto/release/latest/doc/Selecto.html#getSelectableElements

https://daybrush.com/selecto/release/latest/doc/Selecto.html#getSelectedTargets