Skip to content

fix(DataGrid): respect initial Visible property on columns#205

Open
mathewtaylor wants to merge 2 commits intodevelopfrom
20260305-datagrid-column-visible-init
Open

fix(DataGrid): respect initial Visible property on columns#205
mathewtaylor wants to merge 2 commits intodevelopfrom
20260305-datagrid-column-visible-init

Conversation

@mathewtaylor
Copy link
Contributor

Summary

  • Fixes [bug] BbDataGrid does not respect initialized Visible options for columns #201BbDataGrid now respects the Visible parameter set on columns during initialization
  • Changed DataGridColumnState.Initialize() to accept initial visibility values alongside column IDs, so columns declared with Visible="false" are hidden on first render
  • Existing entries (e.g., from restored/persisted state) retain their current visibility

Test plan

  • Build succeeds with no warnings
  • API surface snapshot tests pass (2/2)
  • Verify in demo app: add a column with Visible="false" and confirm it is hidden on load
  • Verify toggling column visibility via BbDataGridColumnVisibility still works after the change
  • Verify persisted/restored state still takes precedence over initial values

Pass each column's Visible parameter to DataGridColumnState during
initialization so columns declared with Visible=false are hidden on
first render instead of defaulting to visible.

Fixes #201
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant