nadbm / react-datasheet

Excel-like data grid (table) component for React
https://nadbm.github.io/react-datasheet/
MIT License
5.4k stars 457 forks source link

feat: expose selecting prop #294

Open Zhdanown opened 3 years ago

Zhdanown commented 3 years ago

This PR exposes selecting prop to Cell component

Use case: I need to implement scroll to selected cell when navigating. OnCellsChanged props is not suitable for the task since it doesn't have access to cell's refs. Without this prop my scrollToCell logic is executed on every selection change which results in a bad UX.