buildo / bento-design-system

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

Enable autoResetSortBy when manual sorting and initialSorting are used together #892

Closed pedrodim closed 2 months ago

pedrodim commented 2 months ago

This PR enables autoResetSortBy when both onSort (manual sorting) and initialSorting are set, so that we can gain more control on the table's sortBy internal state (it resets to the initial state whenever data changes). This is useful when the data sorting can be updated from outside the table, like for example controls (maybe a "reset table" button) or route navigation.