refactor(data-table): keep ColumnSettings composable (toolbar API consistency)#400
Draft
itsprade wants to merge 2 commits into
Draft
refactor(data-table): keep ColumnSettings composable (toolbar API consistency)#400itsprade wants to merge 2 commits into
itsprade wants to merge 2 commits into
Conversation
…bar API) Per review (Seiya): the toolbar's built-in controls should share one API. Revert the `columnSettings` toolbar prop back to a composed sub-component, `DataTable.ColumnSettings`, matching `DataTable.Filters` / `DataTable.Pagination`. - `DataTable.ColumnSettings` is public again; it right-aligns itself (`ml-auto`), so `<Filters/> <ColumnSettings/>` lays out filters-left / Columns-right on one row with no consumer layout work. - `DataTable.Toolbar` is a plain flex row (no special props). - Docs, catalogue skill, changeset, tests, and the lab example updated to the composed form. Behavior and appearance are unchanged from the prop version. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
itsprade
force-pushed
the
feat/data-table-column-controls
branch
from
July 23, 2026 09:28
acefd61 to
df54949
Compare
Contributor
|
@copilot rebase branch to main |
Contributor
Rebased locally onto |
…n-controls # Conflicts: # docs/components/data-table.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
#382 merged with column settings exposed as a boolean prop on the toolbar:
That's inconsistent with every other toolbar piece (
DataTable.Filters,DataTable.Pagination), which are composed sub-components. Flagged by @seiya — worth cleaning up before the next release so the API is uniform.Change
Revert to a composed sub-component,
DataTable.ColumnSettings:DataTable.ColumnSettingsis public again (matchesFilters/Pagination).ml-auto, so filters flow from the left and the Columns control parks on the right — one row, no consumer layout code.DataTable.Toolbaris a plain flex row (drops thecolumnSettingsprop).Behavior and appearance are unchanged — this is purely an API shape change (and the feature hasn't shipped yet, so it's not a breaking change).
Not included (separate follow-up)
@seiya's larger idea — splitting
Filtersinto slots (slot="add" addIconOnly/slot="chips") for finer toolbar-layout control — is a biggerFiltersrefactor and is not in this PR. Proposed as a follow-up so we can land the consistency fix now.Verification
type-check,lint,test(1394 pass),oxfmt --check, andexamples/vite-apptype-check all pass; verified live in the DataTable Lab (filters + Columns share one row, popover works).🤖 Generated with Claude Code