Repository navigation
v2.0.0-beta.16
Pre-releaseMajor Changes
-
#71
77b0819Thanks @Psvensso! - TanStack Table 9.2.4: the peer dependencies@tanstack/react-tableand@tanstack/table-coremove from^9.0.0-beta.21to^9.2.4, and column pinning follows TanStack's rename from physical to logical sides.Upgrading:
- Install
@tanstack/react-table@^9.2.4and@tanstack/table-core@^9.2.4. The@tanstack/storeand@tanstack/react-storepeers move to^0.11.1, the range table-core requires; a second store copy at 0.11.0 stops the grid from re-rendering on external atoms. columnPinningis{ start, end }instead of{ left, right }: ininitialState, in a controlledstate.columnPinningand itsonColumnPinningChange, and wherevertable.store.state.columnPinningis read.column.pin("left" | "right")iscolumn.pin("start" | "end"),column.getIsPinned()returns"start","end"orfalse, and the table'sgetLeft*/getRight*methods aregetStart*/getEnd*. TanStack lists every rename innode_modules/@tanstack/table-core/skills/migrate-v8-to-v9/SKILL.md, section 5.getColumnRegionreturns"start" | "center" | "end", andTMDataGridColumnRegionmatches.- Settings saved under
settingsKeyby 1.x with the oldleft/rightkeys are read and migrated; nothing to do. - A custom
aggregationFnon a column definition is now aconstructAggregationFn({ aggregate })definition rather than a bare function. The named built-ins ("sum","min", ...) andTMDataGridAggregationNameare unchanged. - The menu labels, the
data-pinnedcell attribute and the sticky CSS keepleft/right: they name the physical side.
- Install
Minor Changes
-
#70
007c308Thanks @Psvensso! - Export.TMDataGrid.Menu.ExportandTMDataGrid.Menu.ExportSelected- menu items downloading every filtered row, or the selected rows in grid order, in the grid's format. Props override the format, file name, headers and label per item.useTMDataGridExport- the export as click handlers (exportAll,exportSelected,selectedCount,canExportSelected) for a control of your own.exportGrid,buildExportData,writeExportFile- the same export from outside a component.- Formats:
csvExcelFormat(the default, as before),csvFormat,tsvFormat,jsonFormat;TMDataGridExportFormatfor one of your own. exportOptionsonuseTMDataGrid- format, file name, header row andcolumns("visible","all"or ids) for every export, the cell-range menu included.columns="custom"on the menu items opens a column picker: every exportable column, the visible ones ticked and the hidden ones marked, select all with a count, a search box from six columns, Export and Cancel.ui.state.exportPicker,ui.actions.openExportPicker/closeExportPicker,getExportableColumns.- Column meta
enableExportandexportValue. - The text formats prefix a value that a spreadsheet would run as a formula;
escapeFormulas: falseon the format turns it off. data-dg-part:menu-export,menu-export-selected,export-picker,export-picker-hint,export-picker-search,export-column,export-column-all,export-picker-count,export-picker-confirm,export-picker-cancel.- Labels:
exportAll,exportSelected(count),exportPickerTitle(format),exportPickerHint(selected),exportPickerConfirm,exportPickerCancel,exportPickerSelectAll,exportPickerCount(checked, total),exportPickerHidden,exportCells(the cell-range item, wasexportCsv). - Deprecated, removed in the next beta:
cellExportonTMDataGrid.Table,exportGridToCsv,TMDataGridCellExportOptions,DEFAULT_CELL_EXPORT_OPTIONS,buildCellMatrix,buildGridCellMatrix,TMDataGridCellMatrix,toExcelCsv,downloadTextFile,labels.exportCsv. - New package
@jielga/tmdatagrid-xlsx:xlsxFormat()writes an Excel workbook with typed cells, on exceljs.
Patch Changes
-
#70
a95b8c3Thanks @Psvensso! -TMDataGrid.Menu.ColumnsandTMDataGrid.ColumnsPanelshow their search box from six hideable columns.
searchableisTMDataGridColumnSearchable(boolean | "auto"), default"auto";truekeeps the box on a shorter list. -
60f8292Thanks @Psvensso! - An entry row blocked by validation now shows it: the ✓ turns red with the message in its tooltip, as the Save does, and a cell a pathed issue names carriesdata-invalidand the red corner. -
2e107adThanks @Psvensso! - Column resizing, the cell range drag and the filter popup's click-away now work when the grid is rendered through a portal into a window opened withwindow.open.
Their listeners attach to the grid's own document and window rather than the global ones.Focus checks, editor focus handling, select-column click detection and autosize measurement use the grid's own document and window as well, so they behave the same in a popup window as inline.