buildo / bento-design-system

A customizable and extensible Design System framework for React.js projects
https://www.bento-ds.com
MIT License
107 stars 12 forks source link

[Table] Allow auto-sorting even when onSort in passed #839

Open veej opened 5 months ago

veej commented 5 months ago

Currently, passing an onSort handler to the Table enables manual sorting, meaning that the data must be sorted manually before passing it to the component.

However, there are cases where we want to let the Table handle the sorting automatically even if we pass an onSort handler to the component (e.g. if the onSort handler is used to just execute some side-effects whenever the sorting changes).

Should we allow users to decide when to enable manual sorting?