Repository navigation
v2.0.0-beta.12
Pre-releaseMajor Changes
-
#61
9425688Thanks @Psvensso! - Breaking. The filter panel is no longer welded toTMDataGrid.Table. A new
filtersoption picks the surface:surface: "popup"(the default) floats the panel over the rows, as before.surface: "sidebar"puts it beside them, inside the grid frame. Starts open,
and takessidebarSideandsidebarWidth.surface: "none"renders no panel and noFilterButton, leaving a
hand-placedTMDataGrid.FilterPanelas the only one on the page.inHeader: trueadds a header row of per-column value controls, each with a
funnel button for its operator. Independent ofsurface. The column menu's
Filter item and the filtered-header funnel come off with it.
TMDataGrid.FilterPanelis now a plain block of controls with no title, no
close button and no open state - the popup and the sidebar own that chrome. It
takeslayout="row" | "stacked", and passes that through to every value
control.What breaks:
TMDataGrid.FilterPanelrenders whenever it is mounted. It used to hide
itself unlessui.state.filterPanelOpen, so a hand-placed one now shows
permanently, and shows alongside the popup unless you also set
surface: "none".filter-panel-closemoved out offilter-panel; it is now a child of
filter-popup/filter-sidebar. A test scoping the close button inside the
panel has to be re-pointed.TMDataGridLabelsgained a requiredfilterOperatorFor. A complete
translation typed asTMDataGridLabelsno longer compiles until it is added;
TMDataGridLabelsOverrideis unaffected.TMDataGridApigained a requiredfilters, andTMDataGridFilterControlArgs
a requiredlayout- both break code that builds one of these by hand rather
than spreading, which in practice means test doubles.ui.state.filterPanelColumnIdis now the panel's alone; the header row reads
the newheaderFilterColumnId. The actions arefocusPanelFilterand
focusHeaderFilter.
New exports:
TMDataGridFiltersOptions,TMDataGridFiltersSettings,
TMDataGridFilterSurface,TMDataGridFilterSidebarSide,
TMDataGridFilterControlLayout,TMDataGridFilterPanelLayout,
TMDataGridFilterPanelProps,TMDataGridFilterValueShapeand
filterValueShape.Also fixed: a header group now spans the columns under it instead of sitting in
one track, and stacked header rows no longer pin to the same edge and paint
over each other.
Minor Changes
-
#59
1b375bbThanks @Psvensso! - Server-side ergonomics, from building the server-backed search recipe.- Under
manualPaginationthe grid takes itself back to the first page when the query changes - a column filter, the quick search or the sort - in the same event as the change, so one request goes out. A filter row with an empty value is not a query change.resetPageOnQueryChange: falseswitches it off. activeColumnFilters(columnFilters | table)returns the filters that narrow anything, withvaluetyped asTMDataGridFilterValueinstead ofunknown.Controls.PageNumberrenders "Page 3 of 200" for arenderPaginationlayout, with apageNumberlabel. Not in the default footer.SummaryCountrenders the matched count alone undermanualFilteringormanualPaginationwithoutmeta.totalRowCount. The fallback denominator was the current page, so a server-side grid read "25 / 25".- The controlled-state sync no longer publishes the table store during the consumer's render, which React reported as "Cannot update a component (…) while rendering a different component (…)" on the first sort or filter of any grid owning a state slice. Subscribers to
table.storeare now notified in a microtask after that render pass - the same retiming applies to the grid's own grouping, persistence and resize-preview subscriptions. - The last column's resize divider no longer hangs 5px past the last track, which put a permanent horizontal scrollbar under a grid whose columns fit.
- A column resolving
meta.options: "faceted"undermanualFilteringormanualPaginationwarns once: the distinct values of one page are not the distinct values of the result set.
- Under