Repository navigation
v1.1.0
Minor Changes
-
#18
62d0cbcThanks @Psvensso! - Breaking. Every render surface is now arender*prop over one typed args object, and the chrome slots hand over the pieces of what they replace instead of only the data behind it.TMDataGrid.Footer'spaginationbecomesrenderPagination, and its argument becomes{ state, actions, Controls }. The flatTMDataGridPaginationApimembers split acrossstate(pageIndex,pageSize,pageCount,rowCount,canPreviousPage,canNextPage, plus the newisPagingActive,fromandto) andactions(setPageIndex,setPageSize,previousPage,nextPage,firstPage,lastPage).Controls.PageSize,Controls.RangeandControls.Pagerare the built-in pieces, so a custom pager keeps the parts it likes rather than rebuilding them.getTMDataGridPaginationApi(table)returns the same{ state, actions }shape.TMDataGrid.Table'srowContextMenubecomesrenderRowContextMenu, and the typeTMDataGridRowContextMenubecomesTMDataGridRowContextMenuRenderer. Its args gaininternalItems: reading it hands the composition over, so the menu is exactly what you return; ignoring it keeps today's behavior, the grid's copy and export items above a divider and yours below.TMDataGrid.TablegainsrenderColumnMenuItems, which receives{ column, table, internalItems }and returns the full item list. Returning an empty list leaves the column with no menu button.TMDataGrid.EditActionsgainsrenderActions, over{ state, actions, Controls }withstate.pendingCount,state.isSubmittingand the built-inControls.Save/Controls.Discard.
Migrating:
pagination={(api) => …}becomesrenderPagination={({ state, actions }) => …}withapi.pageIndexreading asstate.pageIndexandapi.nextPage()asactions.nextPage();rowContextMenu={…}becomesrenderRowContextMenu={…}with the same arguments.