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
2k stars 81 forks source link

How to support keyboard shortcuts? (react-selecto) #172

Open tomelliot opened 1 month ago

tomelliot commented 1 month ago

I'm trying to add keyboard shortcuts (like select-all ("meta+a"), select-none ("esc")) in a react-selecto instance.

Is there a way to handle this with Selecto? Currently I don't see a way - the onSelect handler ends up with a state mismatch, because there's no hook for synchronising internal state with external state.