Documentation

Upgrading

How versions are numbered

  • Patch (1.4.1 → 1.4.2): fixes.
  • Minor (1.6.0 → 1.7.0): new features, plus fixes. A fix can change what your app sees — an export that now writes real dates, a search that now finds more rows. Every such change is listed below, under the version that made it.
  • Major: none so far.

The packages of one product do not always share a number: in a release, each package moves by what changed in it. The changelog lists the exact number of every package in each release.

Upgrade the packages together

The Enterprise packages depend on an exact version of the Community ones. Upgrade every @kanunilabs/datagrid* package your app lists in the same command, to the set one release shipped:

npm i @kanunilabs/datagrid-react@latest @kanunilabs/datagrid-react-enterprise@latest

Upgrading only one of them can install a second copy of the engine next to the first. Two copies do not share state: a licence key set through one is not seen by the other. Check that one version is installed:

npm ls @kanunilabs/datagrid-core

One version in the tree is right; two mean a package was left behind.

What changes for you

The changes below can make an existing app behave or type-check differently after an upgrade. Versions not listed asked nothing of you. Going from an older version to the newest, read every entry in between.

DataGrid 1.10.7

@kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected]

  • A view-state part whose owner unregisters (registerViewStatePart) now stays in getViewState().parts with its last snapshot until the owner registers again, instead of leaving the view. A chart kept this way is handed back to the chart when it returns.
  • stateStoring no longer writes when the grid is torn down unless a save is still waiting.
  • The docked chart is shown no taller than leaves the grid 80 px of rows, on open and when its box resizes; the height kept in the chart state is unchanged.
  • In Excel, numeric text with decimals ("12.50") in a column on the default number format keeps its decimals (#,##0.00).

DataGrid 1.10.6

@kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected]

  • The toolbar search sends its text trimmed: getSearchText(), filterChanged, the saved view and a server source's searchText no longer carry the spaces typed around it.
  • In Excel, text that reads as a number in a number column ("12.50", as MySQL sends a DECIMAL) is written as a number, and a date that names no day ("0000-00-00") as an empty cell, in the plain, styled and streamed exports. A whole number on the default number format is shown without a trailing decimal separator.
  • The chart divider counts only the grid's rows (80 px) against its minimum, not the header and footer, so the chart can be dragged taller in a short box than in 1.10.5.

DataGrid 1.10.5

@kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected]

  • The Turkish name of the missing-value row in the header filter (and of a blank group) is now "(Boş Olanlar)", matching "(Boş Olmayanlar)". A test that looks for "(Boşlar)" must look for the new word.
  • The filter panel sentence names an empty string "(empty text)" and a value of spaces "(1 space)", "(2 spaces)", as the header filter lists them; a missing value reads "(Blanks)". FilterLabels gains emptyText, space and spaces: a full FilterLabels object of your own needs them.
  • Under portalContainer the layer the grid puts its popups in now covers the viewport (it was zero-size) and passes clicks through to the page; what is put in it takes them. An app that styled .kanuni-datagrid-portal-host should check its rule.
  • The grid's error message (a failed menu action) is marked data-kanuni-portal="toast" instead of "popup".
  • With the Enterprise side bar, card view compares its breakpoint with the grid and the side bar together, so a grid with a side bar switches to cards at the same screen width as one without.

DataGrid 1.10.4

@kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected]

  • On a text column, = and in compare as text: an empty string, a space, 0 and 012 are four different values, where they used to be read as numbers and match each other (012 equalled 12). A number or bigint column compares numerically as before.
  • The header filter lists a missing value (null) as its own row, and an empty string and each run of spaces as rows of their own, where all of them were one Blanks row. A filter you stored with the old behaviour keeps working; a list you build from the checklist now names the value it means.
  • The header filter popup is named from the dictionary (filterPopupAria, "{column} filter" in English). A test that finds it by an English aria-label in another language must use the grid language.
  • The filter builder dialog, its bar and the Import button read their text from the grid dictionary. In English the words are the same; in any other language they now follow the grid.
  • When your app passes onOpenFilterBuilder to an Enterprise grid it is now the one called by the filter panel and the header filter, with { columnId }; before, the grid replaced it with its own. controller.openFilterBuilder() opens the grid's own builder whichever you pass.

DataGrid 1.10.3

@kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected]

  • The toolbar search runs at once when the box loses focus or on Enter, instead of only after the debounce. Pass toolbar={{ search: { applyOnBlur: false } }} for the old timing.
  • Number editors inside cells are right-aligned and have no spin buttons; editors keep the cell's padding, so the value stays where the cell drew it.
  • In the header filter of a client-side list, Select all and Clear act on the values the search box shows when it has text (as in Excel); ticks the search hides are left as they were. With the box empty they act on the whole list, as before. Before, Select all ticked every value whatever the search said.
  • FilterOperator gains notin. A TypeScript switch over the operators that has to be exhaustive needs a case for it; a notin condition in a filter you send to your own server is the complement of in, blanks included.
  • A server-side source keeps working unchanged: a loadDistinctValues that answers an array still gets the single list of at most limit values. Answering a page ({ values, totalCount, hasBlanks } to a request with skip and take) is what lists every value.
  • The Enterprise status bar is no longer role="status" itself: its counts sit in an inner .kanuni-datagrid-status-live element that carries the role, and your itemsAfter moved into its own .kanuni-datagrid-status-items--end group outside it. Tests or CSS that looked for [data-testid="dg-status-bar"][role="status"] should look for the inner element.

DataGrid 1.10.2

@kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected]

  • With rowStatus.messages on, the rows the grid draws include a row of kind message under each refused save. Code that walks the displayed rows and switches on kind should skip it; with the option off nothing changes.
  • Every palette and colour scheme defines three new tokens, --dg-success, --dg-success-text and --dg-on-success. A theme of your own that sets every --dg-* token keeps working and can add them.

DataGrid 1.10.1

@kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected]

  • The free DataGrid and createGrid now honour editing.mode: batch, row, form and popup work instead of falling back to cell editing. An app that passed one of them to the free grid gets that mode now. In these modes the grid does not write into your rows: onSave receives the changes and the app writes them into its data.
  • The styles for the Save / Cancel strip, changed and removed cells, the edit form and the popup moved from the Enterprise stylesheet to the free one. Load both stylesheets, as the setup guide says; an Enterprise app that loaded only @kanunilabs/datagrid-react-enterprise/styles.css (or @kanunilabs/datagrid-enterprise/styles.css) loses them.
  • Enter on a button of the edit form (Cancel, for instance) now presses that button; it used to save the row. Grid columns such as the selection check box are no longer offered as form fields.
  • In the free React grid a cell that is still being saved in cell mode carries the changed-cell marker, as the plain-JavaScript grid already did.

DataGrid 1.10.0

@kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected]

  • createRestDataSource cancels a running request only when the query changes (sort, filter, search, grouping). Blocks of one query now load side by side, so a server sees a few requests at once while the reader scrolls; before, each new block cancelled the one before it and rows could stay blank.
  • The column chooser lists every column with a check box, under a "Columns" title, with a search box above eight columns; before, it listed only the hidden ones and opened empty when none was hidden. The last visible column cannot be hidden.
  • "Chart by this column" on a number column charts it as a series (its values summed per category) instead of using every amount as a category. "Show group footers" appears in the header menu only while the grid is grouped.
  • A cell with a search highlight holds its text and marks in one span.kanuni-datagrid-cell-text. CSS that styled the cell's direct children should target that span.
  • Toolbar and chart-panel commands carry an icon beside their label (svg.kanuni-datagrid-icon + a span), and the chart panel's commands sit in .kanuni-dg-chart-actions. Code that read a button's textContent still gets the label.
  • In batch editing the Save / Cancel strip is not mounted while nothing is pending; before, .kanuni-datagrid-filter-bar was an empty band. Tests that looked for it right after mount should wait for a change.
  • A detail panel is as wide as the viewport, not as wide as all the columns, and pressing its arrow no longer selects the row.
  • In development the console warns once when a grid has no height of its own and draws every row of a large result.
  • @kanunilabs/datagrid-server: an unknown sort direction is now a 400 (SqlRequestError) instead of being read as ascending, and on PostgreSQL the nils-last sort is written col ASC NULLS LAST. An expression index you built on the old CASE WHEN col IS NULL … term no longer matches there; indexStatements writes the ones that do.

DataGrid 1.9.0

@kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected]

  • A footer or group total on a number column with no formatter now groups its digits in the grid's locale and keeps at most two decimals (260,064,641.94 instead of 260064641.94). A column or summary formatter still decides when you set one.
  • A filter condition whose operator the column does not know now matches no rows; before, it let every row through. A saved view that names an operator the column no longer registers is the likely source, and debugMode names it on the console.
  • createRestDataSource now sends summaries and parentKey in the query string, JSON-encoded like sort and filter, when the grid asks for footer totals or a tree level. A server that refuses unknown parameters has to accept them.
  • With grouping on the server, summaries now comes with the load request of every grouping level, not only the top one, so sub-group totals can be filled (they stayed empty before). The footer is still read from the answer for the top level only (Enterprise).
  • An edit on a column whose id differs from its field now writes the row's field; before, it wrote a property named after the id.
  • In the Enterprise grid a refused onSave now shows its error dialog; before, the dialog was cleared before it could appear.
  • The plain-JavaScript grid lays out right to left for Arabic, as the React grid already did.

DataGrid 1.8.0

@kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected]

  • Four structure themes are renamed: quartz is now minimal, balham is ledger, material is elevated and alpine is framed, and their kanuni-datagrid-theme-* classes with them. An old name is a type error in TypeScript; in plain JavaScript it is treated as a theme of your own and falls back to the default look.

DataGrid 1.7.0

@kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected]

  • A plain click on a chart category keeps every category on the chart, the others dimmed; before, it narrowed the chart to the clicked one. Ctrl/Cmd-click works as before.
  • A remove and an add of the same row id in one applyTransactionAsync now replace the row; before, they cancelled each other out.
  • Loading rows from a server no longer needs a licence. On a Community grid fed by a server, the grouping, server tree and whole-result export entries are not offered; those stay Enterprise.

DataGrid 1.6.0

@kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected]

  • Exports format the grand-total text the way the grid shows it: a PDF totals row reads "$50.00" where it read "50".
  • Excel exports write ISO date strings and epoch numbers in a date column as real dates instead of text.
  • A date column with a dateFormat exports and copies the formatted date (CSV, PDF, clipboard, filter list) instead of the stored value.

DataGrid 1.5.0

@kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected]

  • With deferred select-all, selectionChanged reports the selected rows and their count; before, it reported no rows and a count of 0.

DataGrid 1.4.1

@kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected]

  • In batch editing, a validation rule that reads another column sees the value the user just typed there, not the stored one.

DataGrid 1.4.0

@kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected] · @kanunilabs/[email protected]

  • The CSV separator follows the grid's locale: ; for Turkish, German, French, Spanish, Italian, Portuguese, Russian and Arabic, , elsewhere. If a program reads your CSV files with a fixed separator, pass delimiter to the CSV export.
  • Search, text filters and lookups treat İ, I, ı and i as one letter, and search also matches what a cell shows (valueFormatter, dateFormat). A search can find rows it did not find before.
  • Types: theme is typed GridThemeName; code that copies the prop's type into a GridTheme should use GridThemeName. A dictionary typed as the full GridDictionary needs the eight new licence keys; a partial messages object needs nothing.