Notes for Solid
Differences from the React version (ref, when render functions run, /ai, speed), signals and stores, when writes take effect, actions, async rows, testing, picking the features you ship, versions
Things to keep in mind when using the Solid version (@ishibashi0112/spreadsheet-grid-solid). The props, column definitions, imperative handle methods, callbacks, and CSS classes and tokens are the same as in the React version, so the API reference applies as is. Pick Solid at the top of the sidebar and the guides show their code in Solid. For code without tabs, change the import to @ishibashi0112/spreadsheet-grid-solid and it works as is (call signals when you pass them, as in rows={rows()}, receive the imperative handle with let grid! and ref={grid}, and write gridRef.current?.applyRows(…) as grid.applyRows(…)). For rendering on the server, see SSR.
Differences from the React version
refworks like a Solid DOM ref. Uselet grid!: SpreadsheetGridHandle<Row>withref={grid}, orref={(handle) => (grid = handle)}, to receive a handle with the same methods (there is no React ref object). The handle is set before your component's firstcreateEffectandonSettled, so you can call it there (to restore saved state, scroll to the end, and so on). Inside<Loading>, the grid isn't rendered until the first rows arrive, and methods that change state do nothing until then (you're told once in development). Pass the initial state withinitialState, or call the methods from an effect that reads the rows (createEffect(() => rows().length, …)). After the grid is removed (hidden with<Show>, for example), a handle left in a variable does nothing for methods that change state (you're told once in development), and methods that read return the values from when it was removed (you can savegrid.getState()inonCleanup;getScrollPosition()returnsnullandisAtBottom()returnsfalse).- Render functions run only when needed.
renderCellandrenderHeaderare called again when the columns change, and the bar functions when the functions change (not on every update as in the React version). Context values (row/value/rowIndex/isActive, the bar context and each item of itsderivedSummary, and so on) are looked up when read, so if you read them inside JSX, only that expression follows the change. Callingctx.setValueon every keystroke in an input inside a cell keeps the input in place without losing focus (since 1.4.0; before that the cell's contents were rebuilt whenever the row changed). If you read them in the function body (including destructuring the argument), the contents are rebuilt when that value changes (for an input in a bar, focus and half-typed text are lost). If you read them at the top of your own component's body (const v = props.ctx.valueinsideMyCellwithrenderCell={(ctx) => <MyCell ctx={ctx} />}), later changes are not followed (Solid reportsSTRICT_READ_UNTRACKEDin development). Read them inside JSX there too. Reading a signal from outside the grid in the body ofrenderCellrebuilds the contents of every visible cell whenever it changes. Read it inside JSX, or go through a memo per row key. - Filter with words (
/ai, since 1.4.0). ImportGridAskBarandcreateGridAsk(useGridAskin the React version; Solid's convention is thecreate…name) from@ishibashi0112/spreadsheet-grid-solid/ai(about 15KB gzip, separate from the grid's bundle). Pass the grid as a function that returns the handle,grid={() => grid}(withlet grid!andref={grid}), or as a signal (ref={setGrid}andgrid={grid}) (there are no ref objects). Everything else (yourask, the shape of the answer,gridAskLocaleTextEnfrom/locales/en) is the same as in the React version (Filter with words). - Speed. Scrolling and editing are about as fast as in the React version. Measured on 2026-11-28 in a production build on Chromium:
Ctrl+Endon a million rows takes about as long as the React version, JS time for large vertical jumps in a table of about 200 columns is shorter than the React version (about 0.6x), small scrolls take about 1.2x, large horizontal jumps about 1.5x, and a table of about 200 columns uses about 3.5MB more memory (each visible cell holds a few Solid computations. When only the rendered range changes, row elements and cell components are reused and only their contents are rewritten). - Everything else (props, column definitions, handle methods, callbacks, CSS classes and tokens) is the same as in the API reference.
Things to keep in mind with Solid
rowscan be a signal or a store.onRowsChangereturns a new array on every edit (the same contract as the React version). With a signal, pass it straight back withsetRows(next). WithcreateStore, pass it withrows={state.rows}and put it back withsetState((s) => { reconcile(next, 'id')(s.rows) }), and undo / redo work just as with a signal (since 1.4.0.setState((s) => { s.rows = next })also works, but Solid reportsIMMUTABLE_UPDATE_IN_STOREin development). Changes made directly inside the store (s.rows[0].name = …/push/splice) also reach the grid, and as when the parent replaces rows in the React version, the undo history is cleared. A store tracks each row to notice changes inside it, so with many rows every edit takes time (about 0.1 seconds per edit at 100,000 rows). Keep tables with more than about 50,000 rows in a signal (you're advised once in development).- Writes take effect in a microtask. After
setRows(...), the grid sees the new rows the next time changes are applied. To use a row you just added right away (getViewRowIndex(key)→startEditing(...)), callflush()fromsolid-jsfirst (the same asflushSyncin the React docs). - Save with an
action. You may start anactioninside the grid's callbacks (onRowsChange={(next) => save(next)}writing tocreateOptimisticinside the action, orsave(next)aftersetRows(next)). The grid keeps its own writes out of your action, so the editor closes during the save and further edits go into that row (the same asstartTransitionin the React version). Take where to save (a project ID and the like) from the rows you received, not from props, which may already have changed to another value. When you refetch the saved rows withrefresh(),rowsis replaced from outside, so the undo history is cleared (the same as the React version). - Async rows. Rows from an async
createMemo/createSignal(async)can be used inside<Loading>(the fallback shows until the first rows arrive). During a refetch you can keep working with the previous rows, so show that you're waiting withisPending(() => rows())(loading={isPending(() => rows())}also turns on the grid's loading display; since 1.15.0. In tables with the replace rowfind={{ replace: true }}, Solid may reportEFFECT_RELAY_TEARnamedfindReplacein development; it is harmless and doesn't appear in production). With<Loading on={...}>, the fallback replaces the grid during a refetch (the grid's state is kept, and it comes back when the rows arrive). When it is replaced, the value being edited is committed andonRowsChangereceives the previous rows. Refetch failures go to your<Errored>. Rows read withcreateDeferredshow the original values during the refetch from a save'srefresh()(that is whatcreateDeferredmeans). With an asynccreateMemo, they keep the saved values. - Callbacks after rendering. Callbacks that the React version calls from an effect after rendering (
onActiveCellChange/onStateChange/onFiltersChange/onSortChange/onExpandedDetailRowKeysChange, andonRowSelectionChangewhen deleted rows are removed from the selection) are called right after the change has been applied (in the next microtask), and never after the grid has been removed. In tests, wait once withawait Promise.resolve()afterflush()before you check. - Testing (Vitest + jsdom). Add
@solidjs/vite-pluginto your Vitest config. Without the plugin, writebrowserin all three ofresolve.conditions/ssr.resolve.conditions/ssr.resolve.externalConditions. Use the version of@solidjs/testing-libraryfor Solid 2 (the 1.0 release candidate), and since jsdom has no layout, callinstallJsdomLayoutStubsfrom@ishibashi0112/spreadsheet-grid-solid/testing. After changing a signal or dispatching an event, callflush()before looking at the DOM (instead of the React version'sact()in Testing; for callbacks after rendering, also wait once withawait Promise.resolve()). - Keeping state in the URL. Pass saved state to
initialStateon the first render, save it inonStateChange, and apply later changes (back / forward) withgrid.applyState(...)(Saving and restoring state). You may read signals inside the grid's callbacks (they are called outside tracking, like event handlers). - Expandable rows.
detailRow.renderis called when a row is opened, andctx.rowlooks up the current row when read. Readctx.rowinside JSX (passing it to a component, as inorder={ctx.row}, is the same) and only that expression follows edits and undo. Read it in the body ofrender(including destructuring the argument,({ row }) => …) andrenderis called again to rebuild the card every time that row changes (focus and half-typed text in inputs inside the card, and the state of a nested grid, are lost). An input value held withcreateSignal(() => ctx.row.x)resets whenever the row changes, so hold unsaved input in a plain signal (createSignal(untrack(() => ctx.row.x))). The same goes for custom editors:ctx.value/ctx.roware looked up when read, so read them inside JSX, or take the starting value withuntrack(() => ctx.value)(orctx.initialText) (reading them in the component body makes Solid reportSTRICT_READ_UNTRACKEDin development). - Values from outside the row. Make
getValue/valueFormatterdepend only on the row and the value. If they read an outside signal, cells follow it but totals (aggFunc) don't. When that signal changes, rebuild the columns (const columns = createMemo(() => makeColumns(totals()))and the like). - Sharing props between several grids. Spread an object that doesn't change, or list the props one by one. Spreading an object that is rebuilt on every change works, but Solid reports
HUGE_FAN_OUTin development. - Shadow DOM (Web Components). Put
style.cssinside the shadow root (<style>oradoptedStyleSheets), wrap the grid in an element instead of rendering it directly under the shadow root (popups appear inside that element), use an open shadow root, and call thedisposereturned byrender()indisconnectedCallback. Details are in the API reference's "Grids inside Shadow DOM". - Solid's notices in development. Under
vite dev, Solid may reportEFFECT_WRITES_OWN_SOURCEwith these effect names:autoHeightMeasurer(after measuring rows inautoHeightcolumns) /activeRowFollow(when the order changes withactiveCellFollows: 'row') /edit(when the order changes while editing) /newRow(when the row count changes while you're in the entry row; since 1.10.0) /history(after undo / redo) /rowSelectionCommands(when deleted rows are removed from the row selection after deleting rows) /pagination(when pagination pulls the current page into range because the row count or the table's height changed; since 1.15.0). These come from the grid realigning its state after a change (the React version does the same re-render). They are harmless and don't appear in production builds. Since 1.4.0, other realignments (keeping the selection inside the range, column widths, scrolling, the server-side row model, callbacks such asonActiveCellChange) don't reportEFFECT_RELAY_TEAR(the values written depend on state outside Solid's graph, such as the grid's store and the DOM, so Solid's measuring treats them as "the work of measuring" rather than derived state).
Picking the features you ship
SpreadsheetGrid includes every feature (about 257KB gzip of JS loaded up front; the column filter popover, the tool panel and the calendar, about 18KB, load later). createSpreadsheetGrid builds a grid with only the features you pass, and the rest stay out of your bundle (about 128KB with no features, about 157KB with the standardFeatures preset). Unlike the React version, the feature parts are imported from the same entry point (there is no /lite). Feature names and what they contain are as in reduce the bundle size (the part names are the same too).
import { createSpreadsheetGrid, standardFeatures, serverSideFeature } from '@ishibashi0112/spreadsheet-grid-solid'
// create it once at the top of a module, not inside a component
const Grid = createSpreadsheetGrid({ features: { ...standardFeatures, serverSide: serverSideFeature } })Versions and changelog
Since 1.4.0 the Solid version is released with the same version number as the React version and the core (1.4.0 came right after 0.1.2), and it depends on the core of the same version. When upgrading from 0.1.x, the range ^0.1.2 doesn't include 1.4.0, so change the range in package.json to ^1.4.0 and check the "behavior changes" of 1.4.0 in the Solid changelog. Versions are raised the same way as the React version: since 1.4.0, breaking changes ship only in major versions (before that, in 0.1.x, they also shipped in minor versions. See Versions and compatibility). Changes shared with the React version are in the CHANGELOG, changes only in the Solid version are in the Solid changelog (both in Japanese), and GitHub Releases show both. Use TypeScript 5.8 or later (moduleResolution set to bundler / nodenext, jsx: "preserve" and jsxImportSource: "@solidjs/web"). If you build a library on top of the Solid version and export inferred types, put the Solid version and the core (the version the Solid version depends on) in peerDependencies.
The README is on npm at @ishibashi0112/spreadsheet-grid-solid (in English and Japanese). The package also includes the API reference (API_REFERENCE.md, the same document as the React version, with a Solid translation guide at the top) and a Skill for AI coding tools (skills/spreadsheet-grid-solid/SKILL.md) (since 0.1.2; see Use with AI assistants).