Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(data-table): Sorting and expansion doesn't work together (carbon-…
…design-system#11416) ### Related Ticket(s) Closes carbon-design-system#11178 carbon-design-system#11481 ### Description Sorting and Expansion option works individually, but sorting is not working when used along with expansion option in Data Table. Checking for `is-sortable` attribute during initial load seems to fix this issue. Selection option is enabled for Data table by default without adding the is-selectable attribute to the table element. ### Changelog **New** - A function to handle the sorting action is added. **Changed** - `is-sortable` attribute was being checked only for changeAttribute cases, this is updated to check on initial load too. - Added a condition to check if is-selectable attribute is added to the Data table component <!-- React and Web Component deploy previews are enabled by default. --> <!-- To enable additional available deploy previews, apply the following --> <!-- labels for the corresponding package: --> <!-- *** "test: e2e": Codesandbox examples and e2e integration tests --> <!-- *** "package: services": Services --> <!-- *** "package: utilities": Utilities --> <!-- *** "RTL": React / Web Components (RTL) --> <!-- *** "feature flag": React / Web Components (experimental) -->
- Loading branch information