Currently, there is no way for a table column to not support sorting because the sorting attributes (sorting-disabled, sort-index, and sort-direction) are defined on the base TableColumn class. The menu button column, however, should not allow sorting. Therefore, the three sorting attributes are being moved off of the base TableColumn class and into a mixin, that every existing column now uses.
👩💻 Implementation
nimble-components
Create mixin for sortable columns
Remove sorting properties from the base TableColumn class
Add sortingDisabled to column internals
nimble-angular
Remove sorting properties from the base column directive and into each column type directive
Add support for sortingDisabled (including tests) on all columns since this hadn't been exposed through Angular
nimble-blazor
Create ISortableColumn interface
Move sorting properties from the base column component and into ISortableColumn
Update all columns to implement ISortableColumn
Add support for SortingDisabled since this hadn't been exposed through Blazor
Update tests for sortable columns
Update tests for base columns since it previously was only testing sorting properties. I've removed those and added tests for missing base properties of ColumnId, ActionMenuSlot, ActionMenuLabel, and ColumnHidden.
🧪 Testing
Unit tests
✅ Checklist
[ ] I have updated the project documentation to reflect my changes or determined no changes are needed.
Gonna override merge since it's pretty mechanical and following existing patterns. If concerns @jattasNI @atmgrifter00 @msmithNI I'm sure we can address in a follow-up
Pull Request
🤨 Rationale
Currently, there is no way for a table column to not support sorting because the sorting attributes (
sorting-disabled
,sort-index
, andsort-direction
) are defined on the baseTableColumn
class. The menu button column, however, should not allow sorting. Therefore, the three sorting attributes are being moved off of the baseTableColumn
class and into a mixin, that every existing column now uses.👩💻 Implementation
nimble-components
TableColumn
classsortingDisabled
to column internalsnimble-angular
sortingDisabled
(including tests) on all columns since this hadn't been exposed through Angularnimble-blazor
ISortableColumn
interfaceISortableColumn
ISortableColumn
SortingDisabled
since this hadn't been exposed through BlazorColumnId
,ActionMenuSlot
,ActionMenuLabel
, andColumnHidden
.🧪 Testing
✅ Checklist