apex-grid 3.1.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +101 -0
- package/README.md +201 -53
- package/components/cell.d.ts +14 -1
- package/components/cell.js +48 -6
- package/components/cell.js.map +1 -1
- package/components/filter-row.d.ts +3 -6
- package/components/filter-row.js +79 -109
- package/components/filter-row.js.map +1 -1
- package/components/grid.d.ts +416 -70
- package/components/grid.js +398 -11
- package/components/grid.js.map +1 -1
- package/components/group-header-row.d.ts +34 -0
- package/components/group-header-row.js +125 -0
- package/components/group-header-row.js.map +1 -0
- package/components/header-row.d.ts +13 -2
- package/components/header-row.js +33 -18
- package/components/header-row.js.map +1 -1
- package/components/header.d.ts +11 -0
- package/components/header.js +136 -6
- package/components/header.js.map +1 -1
- package/components/paginator.d.ts +6 -1
- package/components/paginator.js +17 -11
- package/components/paginator.js.map +1 -1
- package/components/row.d.ts +28 -0
- package/components/row.js +100 -3
- package/components/row.js.map +1 -1
- package/components/toolbar.d.ts +8 -1
- package/components/toolbar.js +25 -7
- package/components/toolbar.js.map +1 -1
- package/controllers/data-operation.js +1 -0
- package/controllers/data-operation.js.map +1 -1
- package/controllers/dom.d.ts +24 -6
- package/controllers/dom.js +62 -5
- package/controllers/dom.js.map +1 -1
- package/controllers/editing.d.ts +68 -1
- package/controllers/editing.js +129 -44
- package/controllers/editing.js.map +1 -1
- package/controllers/filter.d.ts +1 -1
- package/controllers/filter.js +16 -5
- package/controllers/filter.js.map +1 -1
- package/controllers/history.d.ts +86 -0
- package/controllers/history.js +118 -0
- package/controllers/history.js.map +1 -0
- package/controllers/navigation.d.ts +15 -0
- package/controllers/navigation.js +53 -0
- package/controllers/navigation.js.map +1 -1
- package/controllers/reorder.js +3 -1
- package/controllers/reorder.js.map +1 -1
- package/controllers/row-pin.d.ts +59 -0
- package/controllers/row-pin.js +75 -0
- package/controllers/row-pin.js.map +1 -0
- package/controllers/row-reorder.d.ts +161 -0
- package/controllers/row-reorder.js +332 -0
- package/controllers/row-reorder.js.map +1 -0
- package/controllers/sort.d.ts +1 -1
- package/controllers/sort.js +11 -3
- package/controllers/sort.js.map +1 -1
- package/controllers/state.d.ts +33 -0
- package/controllers/state.js +37 -2
- package/controllers/state.js.map +1 -1
- package/controllers/tree.d.ts +8 -0
- package/controllers/tree.js +0 -0
- package/controllers/tree.js.map +1 -1
- package/custom-elements.json +4415 -875
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/highlight.css +28 -0
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/functions/custom.html +3 -0
- package/docs/functions/interpolate.html +4 -0
- package/docs/functions/localize.html +8 -0
- package/docs/functions/max.html +3 -0
- package/docs/functions/min.html +3 -0
- package/docs/functions/pattern.html +3 -0
- package/docs/functions/required.html +3 -0
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +185 -55
- package/docs/interfaces/ApexCellValidationFailedEvent.html +13 -0
- package/docs/interfaces/ApexCellValueChangedEvent.html +1 -1
- package/docs/interfaces/ApexCellValueChangingEvent.html +2 -2
- package/docs/interfaces/ApexColumnGroupContext.html +6 -0
- package/docs/interfaces/ApexColumnMovedEvent.html +2 -2
- package/docs/interfaces/ApexColumnMovingEvent.html +1 -1
- package/docs/interfaces/ApexDetailContext.html +2 -2
- package/docs/interfaces/ApexGridEventMap.html +37 -9
- package/docs/interfaces/ApexHistoryChangedEvent.html +6 -0
- package/docs/interfaces/ApexPageChangedEvent.html +1 -1
- package/docs/interfaces/ApexRowMovingEvent.html +9 -0
- package/docs/interfaces/ApexRowPinningEvent.html +8 -0
- package/docs/interfaces/ApexStateChangedEvent.html +4 -0
- package/docs/interfaces/BaseApexCellContext.html +1 -1
- package/docs/interfaces/BaseApexEditorContext.html +1 -1
- package/docs/interfaces/BaseColumnConfiguration.html +42 -17
- package/docs/interfaces/CSVExportOptions.html +2 -2
- package/docs/interfaces/ColumnGroupConfiguration.html +12 -0
- package/docs/interfaces/ColumnLayoutState.html +2 -0
- package/docs/interfaces/ColumnSchema.html +22 -0
- package/docs/interfaces/DataPipelineConfiguration.html +2 -2
- package/docs/interfaces/EditingHistoryConfiguration.html +10 -0
- package/docs/interfaces/ExportFormat.html +2 -2
- package/docs/interfaces/ExportOptions.html +1 -1
- package/docs/interfaces/FilterStateSnapshot.html +4 -0
- package/docs/interfaces/GetStateOptions.html +4 -0
- package/docs/interfaces/GridCapabilities.html +8 -0
- package/docs/interfaces/GridEditingConfiguration.html +4 -2
- package/docs/interfaces/GridRowPinningConfiguration.html +5 -0
- package/docs/interfaces/GridRowReorderingConfiguration.html +22 -0
- package/docs/interfaces/GridSchema.html +19 -0
- package/docs/interfaces/GridState.html +41 -0
- package/docs/interfaces/GridTreeConfiguration.html +2 -2
- package/docs/interfaces/PaginationConfiguration.html +1 -1
- package/docs/interfaces/PaginationState.html +1 -1
- package/docs/interfaces/SetStateOptions.html +9 -0
- package/docs/interfaces/SetStateResult.html +11 -0
- package/docs/interfaces/SortStateSnapshot.html +2 -0
- package/docs/interfaces/ValidatorContext.html +8 -0
- package/docs/media/_tokens.scss +131 -44
- package/docs/media/package.json +1 -1
- package/docs/media/state-persistence.html +189 -0
- package/docs/modules.html +1 -1
- package/docs/types/DataPipelineParams.html +2 -2
- package/docs/types/EditMode.html +2 -2
- package/docs/types/GridLocaleKey.html +3 -0
- package/docs/types/GridLocaleText.html +5 -0
- package/docs/types/LocaleParams.html +2 -0
- package/docs/types/PaginationMode.html +1 -1
- package/docs/types/RowDropPosition.html +2 -0
- package/docs/types/RowPinPosition.html +2 -0
- package/docs/types/RowRef.html +3 -0
- package/docs/types/Validator.html +4 -0
- package/docs/variables/EN_LOCALE.html +9 -0
- package/docs/variables/esLocale.html +8 -0
- package/i18n/en.d.ts +151 -0
- package/i18n/en.js +125 -0
- package/i18n/en.js.map +1 -0
- package/i18n/es.d.ts +18 -0
- package/i18n/es.js +125 -0
- package/i18n/es.js.map +1 -0
- package/i18n/index.d.ts +3 -0
- package/i18n/index.js +4 -0
- package/i18n/index.js.map +1 -0
- package/i18n/localize.d.ts +23 -0
- package/i18n/localize.js +15 -0
- package/i18n/localize.js.map +1 -0
- package/index.d.ts +8 -2
- package/index.js +2 -0
- package/index.js.map +1 -1
- package/internal/feature-module.d.ts +46 -0
- package/internal/feature-module.js +11 -0
- package/internal/feature-module.js.map +1 -1
- package/internal/flip.js +1 -1
- package/internal/flip.js.map +1 -1
- package/internal/icons.d.ts +9 -7
- package/internal/icons.js +75 -35
- package/internal/icons.js.map +1 -1
- package/internal/index.d.ts +5 -3
- package/internal/index.js +2 -1
- package/internal/index.js.map +1 -1
- package/internal/state-schema.d.ts +85 -0
- package/internal/state-schema.js +27 -0
- package/internal/state-schema.js.map +1 -0
- package/internal/state-snapshot.d.ts +152 -0
- package/internal/state-snapshot.js +115 -0
- package/internal/state-snapshot.js.map +1 -0
- package/internal/tags.d.ts +1 -0
- package/internal/tags.js +1 -0
- package/internal/tags.js.map +1 -1
- package/internal/types.d.ts +162 -2
- package/internal/types.js.map +1 -1
- package/internal/utils.d.ts +12 -0
- package/internal/utils.js +17 -0
- package/internal/utils.js.map +1 -1
- package/internal/validators.d.ts +31 -0
- package/internal/validators.js +44 -0
- package/internal/validators.js.map +1 -0
- package/package.json +1 -1
- package/styles/_tokens.css.js +1 -1
- package/styles/_tokens.css.js.map +1 -1
- package/styles/body-cell/body-cell.css.js +1 -1
- package/styles/body-cell/body-cell.css.js.map +1 -1
- package/styles/body-row/body-row.css.js +1 -1
- package/styles/body-row/body-row.css.js.map +1 -1
- package/styles/filter-row/filter-row.css.js +1 -1
- package/styles/filter-row/filter-row.css.js.map +1 -1
- package/styles/grid/_grid.base.css.js +1 -1
- package/styles/grid/_grid.base.css.js.map +1 -1
- package/styles/grid/grid.css.js +1 -1
- package/styles/grid/grid.css.js.map +1 -1
- package/styles/group-header-row/group-header-row.css.d.ts +1 -0
- package/styles/group-header-row/group-header-row.css.js +3 -0
- package/styles/group-header-row/group-header-row.css.js.map +1 -0
- package/styles/header-cell/header-cell.css.js +1 -1
- package/styles/header-cell/header-cell.css.js.map +1 -1
- package/styles/header-row/header-row.base.css.js +1 -1
- package/styles/header-row/header-row.base.css.js.map +1 -1
- package/styles/paginator/paginator.css.js +1 -1
- package/styles/paginator/paginator.css.js.map +1 -1
- package/styles/toolbar/toolbar.css.js +1 -1
- package/styles/toolbar/toolbar.css.js.map +1 -1
- package/docs/classes/ApexGrid.html +0 -393
package/docs/index.html
CHANGED
|
@@ -5,22 +5,29 @@
|
|
|
5
5
|
<p>A Lit-based, framework-agnostic web component data grid. Ships as a single custom element <code><apex-grid></code> with a rich, opt-in feature set and full TypeScript types.</p>
|
|
6
6
|
<h2 id="features" class="tsd-anchor-link">Features<a href="#features" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
7
7
|
<ul>
|
|
8
|
-
<li><strong>Row virtualization</strong> via <code>@lit-labs/virtualizer</code
|
|
9
|
-
<li><strong>Sorting</strong
|
|
10
|
-
<li><strong>Filtering</strong
|
|
11
|
-
<li><strong>Pagination</strong
|
|
12
|
-
<li><strong>Column pinning</strong
|
|
13
|
-
<li><strong>Column reordering</strong
|
|
14
|
-
<li><strong>Column resizing</strong
|
|
15
|
-
<li><strong>
|
|
16
|
-
<li><strong>
|
|
17
|
-
<li><strong>
|
|
18
|
-
<li><strong>
|
|
19
|
-
<li><strong>
|
|
20
|
-
<li><strong>
|
|
21
|
-
<li><strong>
|
|
22
|
-
<li><strong>
|
|
23
|
-
<li><strong>
|
|
8
|
+
<li><strong>Row virtualization</strong> via <code>@lit-labs/virtualizer</code>: only ~20 rows in the DOM at any time, regardless of dataset size.</li>
|
|
9
|
+
<li><strong>Sorting</strong>: single or multi-column, tri-state (asc / desc / none), per-column comparers.</li>
|
|
10
|
+
<li><strong>Filtering</strong>: per-column filter chips with string / number / boolean / date operands, plus a quick-filter (global search) input.</li>
|
|
11
|
+
<li><strong>Pagination</strong>: local slicing or remote mode with a <code>pageChanging</code> / <code>pageChanged</code> event pair; built-in <code><apex-grid-paginator></code>.</li>
|
|
12
|
+
<li><strong>Column pinning</strong>: pin to start or end; visual reordering only, source <code>columns</code> array is preserved.</li>
|
|
13
|
+
<li><strong>Column reordering</strong>: drag-and-drop with per-column opt-out, constrained to the column's pinning group.</li>
|
|
14
|
+
<li><strong>Column resizing</strong>: pointer-driven, with a min-width safeguard.</li>
|
|
15
|
+
<li><strong>Column groups</strong>: spanning multi-level headers over a flat <code>columns</code> array, respecting pin regions.</li>
|
|
16
|
+
<li><strong>Inline editing</strong>: cell or row mode, click or double-click trigger, per-column opt-in.</li>
|
|
17
|
+
<li><strong>Cell validation</strong>: declarative per-column <code>validators</code> (built-ins plus custom), surfaced with <code>aria-invalid</code> and an event.</li>
|
|
18
|
+
<li><strong>Undo / redo</strong>: opt-in history for cell edits, with keyboard shortcuts (Ctrl/Cmd+Z, etc.).</li>
|
|
19
|
+
<li><strong>Row selection</strong>: single or multiple, optional checkbox column, full programmatic API.</li>
|
|
20
|
+
<li><strong>Row pinning</strong>: sticky top / bottom bands rendered outside the virtualizer.</li>
|
|
21
|
+
<li><strong>Row drag-reorder</strong>: pointer and keyboard reordering with a manual order, mutually exclusive with sorting.</li>
|
|
22
|
+
<li><strong>Row expansion (master-detail)</strong>: opt-in chevron column with a <code>detailTemplate</code>.</li>
|
|
23
|
+
<li><strong>Tree data (nested rows)</strong>: <code>getDataPath</code> pattern over a flat array.</li>
|
|
24
|
+
<li><strong>State & persistence</strong>: <code>getState()</code> / <code>setState()</code> snapshot round-trip, a <code>stateChanged</code> event, and a <code>getSchema()</code> capability descriptor.</li>
|
|
25
|
+
<li><strong>Localization (i18n)</strong>: override any built-in string via <code>localeText</code>; bundled dictionaries (e.g. <code>esLocale</code>).</li>
|
|
26
|
+
<li><strong>CSV export</strong>: programmatic method plus an optional toolbar dropdown. (Excel/XLSX export is in <code>apex-grid-enterprise</code>.)</li>
|
|
27
|
+
<li><strong>Toolbar</strong>: opt-in <code><apex-grid-toolbar></code> with debounced quick filter and export menu.</li>
|
|
28
|
+
<li><strong>Templating</strong>: slot-based templates for cells, headers, editors, and detail panels.</li>
|
|
29
|
+
<li><strong>Theming</strong>: styled out-of-the-box; fully customizable through <code>--ag-*</code> CSS custom properties (no theme import or build step). Auto-matches an <code>igniteui-webcomponents</code> host app when one is present.</li>
|
|
30
|
+
<li><strong>Accessibility</strong>: WCAG 2.2 AA semantics (<code>role="grid"</code> / <code>role="treegrid"</code>, <code>aria-rowcount</code>, <code>aria-colcount</code>, focus + keyboard navigation).</li>
|
|
24
31
|
<li><strong>Provenance-signed npm releases</strong> with OIDC trusted publishing.</li>
|
|
25
32
|
</ul>
|
|
26
33
|
<hr>
|
|
@@ -29,7 +36,7 @@
|
|
|
29
36
|
<pre><code class="ts"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">setup</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'apex-grid'</span><span class="hl-1">;</span><br/><br/><span class="hl-4">setup</span><span class="hl-1">();</span>
|
|
30
37
|
</code><button type="button">Copy</button></pre>
|
|
31
38
|
|
|
32
|
-
<p>That single call registers <code><apex-grid></code> and adopts a default host stylesheet (<code>height: 100%; min-height: 240px</code>). The grid is styled out-of-the-box
|
|
39
|
+
<p>That single call registers <code><apex-grid></code> and adopts a default host stylesheet (<code>height: 100%; min-height: 240px</code>). The grid is styled out-of-the-box; no theme CSS import is required.</p>
|
|
33
40
|
<h3 id="render-the-grid" class="tsd-anchor-link">Render the grid<a href="#render-the-grid" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
34
41
|
<pre><code class="ts"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">html</span><span class="hl-1">, </span><span class="hl-2">render</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'lit'</span><span class="hl-1">;</span><br/><span class="hl-0">import</span><span class="hl-1"> </span><span class="hl-3">'apex-grid/define'</span><span class="hl-1">;</span><br/><span class="hl-0">import</span><span class="hl-1"> </span><span class="hl-0">type</span><span class="hl-1"> { </span><span class="hl-2">ColumnConfiguration</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'apex-grid'</span><span class="hl-1">;</span><br/><br/><span class="hl-5">type</span><span class="hl-1"> </span><span class="hl-6">User</span><span class="hl-1"> = { </span><span class="hl-2">id</span><span class="hl-1">: </span><span class="hl-6">number</span><span class="hl-1">; </span><span class="hl-2">name</span><span class="hl-1">: </span><span class="hl-6">string</span><span class="hl-1">; </span><span class="hl-2">age</span><span class="hl-1">: </span><span class="hl-6">number</span><span class="hl-1">; </span><span class="hl-2">subscribed</span><span class="hl-1">: </span><span class="hl-6">boolean</span><span class="hl-1"> };</span><br/><br/><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-7">data</span><span class="hl-1">: </span><span class="hl-6">User</span><span class="hl-1">[] = [</span><br/><span class="hl-1"> { </span><span class="hl-2">id:</span><span class="hl-1"> </span><span class="hl-8">1</span><span class="hl-1">, </span><span class="hl-2">name:</span><span class="hl-1"> </span><span class="hl-3">'Ada Lovelace'</span><span class="hl-1">, </span><span class="hl-2">age:</span><span class="hl-1"> </span><span class="hl-8">36</span><span class="hl-1">, </span><span class="hl-2">subscribed:</span><span class="hl-1"> </span><span class="hl-5">true</span><span class="hl-1"> },</span><br/><span class="hl-1"> { </span><span class="hl-2">id:</span><span class="hl-1"> </span><span class="hl-8">2</span><span class="hl-1">, </span><span class="hl-2">name:</span><span class="hl-1"> </span><span class="hl-3">'Carl Sagan'</span><span class="hl-1">, </span><span class="hl-2">age:</span><span class="hl-1"> </span><span class="hl-8">62</span><span class="hl-1">, </span><span class="hl-2">subscribed:</span><span class="hl-1"> </span><span class="hl-5">false</span><span class="hl-1"> },</span><br/><span class="hl-1"> { </span><span class="hl-2">id:</span><span class="hl-1"> </span><span class="hl-8">3</span><span class="hl-1">, </span><span class="hl-2">name:</span><span class="hl-1"> </span><span class="hl-3">'Grace Hopper'</span><span class="hl-1">, </span><span class="hl-2">age:</span><span class="hl-1"> </span><span class="hl-8">85</span><span class="hl-1">, </span><span class="hl-2">subscribed:</span><span class="hl-1"> </span><span class="hl-5">true</span><span class="hl-1"> },</span><br/><span class="hl-1">];</span><br/><br/><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-7">columns</span><span class="hl-1">: </span><span class="hl-6">ColumnConfiguration</span><span class="hl-1"><</span><span class="hl-6">User</span><span class="hl-1">>[] = [</span><br/><span class="hl-1"> { </span><span class="hl-2">key:</span><span class="hl-1"> </span><span class="hl-3">'id'</span><span class="hl-1">, </span><span class="hl-2">type:</span><span class="hl-1"> </span><span class="hl-3">'number'</span><span class="hl-1">, </span><span class="hl-2">headerText:</span><span class="hl-1"> </span><span class="hl-3">'ID'</span><span class="hl-1">, </span><span class="hl-2">width:</span><span class="hl-1"> </span><span class="hl-3">'80px'</span><span class="hl-1">, </span><span class="hl-2">sort:</span><span class="hl-1"> </span><span class="hl-5">true</span><span class="hl-1">, </span><span class="hl-2">filter:</span><span class="hl-1"> </span><span class="hl-5">true</span><span class="hl-1"> },</span><br/><span class="hl-1"> { </span><span class="hl-2">key:</span><span class="hl-1"> </span><span class="hl-3">'name'</span><span class="hl-1">, </span><span class="hl-2">type:</span><span class="hl-1"> </span><span class="hl-3">'string'</span><span class="hl-1">, </span><span class="hl-2">headerText:</span><span class="hl-1"> </span><span class="hl-3">'Name'</span><span class="hl-1">, </span><span class="hl-2">width:</span><span class="hl-1"> </span><span class="hl-3">'240px'</span><span class="hl-1">, </span><span class="hl-2">sort:</span><span class="hl-1"> </span><span class="hl-5">true</span><span class="hl-1">, </span><span class="hl-2">filter:</span><span class="hl-1"> </span><span class="hl-5">true</span><span class="hl-1"> },</span><br/><span class="hl-1"> { </span><span class="hl-2">key:</span><span class="hl-1"> </span><span class="hl-3">'age'</span><span class="hl-1">, </span><span class="hl-2">type:</span><span class="hl-1"> </span><span class="hl-3">'number'</span><span class="hl-1">, </span><span class="hl-2">headerText:</span><span class="hl-1"> </span><span class="hl-3">'Age'</span><span class="hl-1">, </span><span class="hl-2">width:</span><span class="hl-1"> </span><span class="hl-3">'100px'</span><span class="hl-1">, </span><span class="hl-2">sort:</span><span class="hl-1"> </span><span class="hl-5">true</span><span class="hl-1">, </span><span class="hl-2">filter:</span><span class="hl-1"> </span><span class="hl-5">true</span><span class="hl-1"> },</span><br/><span class="hl-1"> { </span><span class="hl-2">key:</span><span class="hl-1"> </span><span class="hl-3">'subscribed'</span><span class="hl-1">, </span><span class="hl-2">type:</span><span class="hl-1"> </span><span class="hl-3">'boolean'</span><span class="hl-1">, </span><span class="hl-2">headerText:</span><span class="hl-1"> </span><span class="hl-3">'Subscribed'</span><span class="hl-1">, </span><span class="hl-2">width:</span><span class="hl-1"> </span><span class="hl-3">'140px'</span><span class="hl-1">, </span><span class="hl-2">sort:</span><span class="hl-1"> </span><span class="hl-5">true</span><span class="hl-1">, </span><span class="hl-2">filter:</span><span class="hl-1"> </span><span class="hl-5">true</span><span class="hl-1"> },</span><br/><span class="hl-1">];</span><br/><br/><span class="hl-4">render</span><span class="hl-1">(</span><br/><span class="hl-1"> </span><span class="hl-4">html</span><span class="hl-3">`<apex-grid .data=</span><span class="hl-5">${</span><span class="hl-2">data</span><span class="hl-5">}</span><span class="hl-3"> .columns=</span><span class="hl-5">${</span><span class="hl-2">columns</span><span class="hl-5">}</span><span class="hl-3">></apex-grid>`</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-2">document</span><span class="hl-1">.</span><span class="hl-4">getElementById</span><span class="hl-1">(</span><span class="hl-3">'app'</span><span class="hl-1">)!,</span><br/><span class="hl-1">);</span>
|
|
35
42
|
</code><button type="button">Copy</button></pre>
|
|
@@ -44,7 +51,7 @@
|
|
|
44
51
|
<pre><code class="bash"><span class="hl-4">npm</span><span class="hl-1"> </span><span class="hl-3">install</span><span class="hl-1"> </span><span class="hl-3">apex-grid</span><span class="hl-1"> </span><span class="hl-3">lit</span>
|
|
45
52
|
</code><button type="button">Copy</button></pre>
|
|
46
53
|
|
|
47
|
-
<p><code>igniteui-webcomponents</code> ships as a transitive dependency
|
|
54
|
+
<p><code>igniteui-webcomponents</code> ships as a transitive dependency; no separate install.</p>
|
|
48
55
|
<h3 id="2-register-the-custom-element" class="tsd-anchor-link">2. Register the custom element<a href="#2-register-the-custom-element" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
49
56
|
<pre><code class="ts"><span class="hl-0">import</span><span class="hl-1"> </span><span class="hl-3">'apex-grid/define'</span><span class="hl-1">;</span>
|
|
50
57
|
</code><button type="button">Copy</button></pre>
|
|
@@ -55,16 +62,16 @@
|
|
|
55
62
|
|
|
56
63
|
<p>Without this, <code><apex-grid></code> is an inert unknown element.</p>
|
|
57
64
|
<h3 id="3-optional-customize-the-look" class="tsd-anchor-link">3. (Optional) Customize the look<a href="#3-optional-customize-the-look" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
58
|
-
<p>The grid is styled out-of-the-box
|
|
65
|
+
<p>The grid is styled out-of-the-box; there is no theme to import. Customize it by overriding the <code>--ag-*</code> CSS custom properties on <code>apex-grid</code> (or any ancestor); a one-line brand override cascades to every tint:</p>
|
|
59
66
|
<pre><code class="css"><span class="hl-10">apex-grid</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-12">--ag-brand</span><span class="hl-1">: </span><span class="hl-14">#7c3aed</span><span class="hl-1">; </span><span class="hl-15">/* selection, focus, accents */</span><br/><span class="hl-1"> </span><span class="hl-12">--ag-brand-strong</span><span class="hl-1">: </span><span class="hl-14">#6d28d9</span><span class="hl-1">; </span><span class="hl-15">/* hover / pressed */</span><br/><span class="hl-1"> </span><span class="hl-12">--ag-radius</span><span class="hl-1">: </span><span class="hl-8">12px</span><span class="hl-1">; </span><span class="hl-15">/* outer card radius */</span><br/><span class="hl-1"> </span><span class="hl-12">--ag-row-h</span><span class="hl-1">: </span><span class="hl-8">40px</span><span class="hl-1">; </span><span class="hl-15">/* row height */</span><br/><span class="hl-1">}</span>
|
|
60
67
|
</code><button type="button">Copy</button></pre>
|
|
61
68
|
|
|
62
69
|
<p>See <a href="media/_tokens.scss"><code>src/styles/_tokens.scss</code></a> for the full token list (brand, surfaces, text, semantic state colors, typography, spacing, motion).</p>
|
|
63
|
-
<p><strong>Grid edge / shadow.</strong> By default the grid shows a flat 1px hairline edge (no drop shadow). Control it with the <code>--ag-grid-shadow</code> hook
|
|
70
|
+
<p><strong>Grid edge / shadow.</strong> By default the grid shows a flat 1px hairline edge (no drop shadow). Control it with the <code>--ag-grid-shadow</code> hook, an opt-in override that is not one of the <code>_tokens.scss</code> defaults:</p>
|
|
64
71
|
<pre><code class="css"><span class="hl-10">apex-grid</span><span class="hl-1"> { </span><span class="hl-12">--ag-grid-shadow</span><span class="hl-1">: </span><span class="hl-4">var</span><span class="hl-1">(</span><span class="hl-12">--ag-shadow-card</span><span class="hl-1">); } </span><span class="hl-15">/* elevated floating-card look */</span><br/><span class="hl-10">apex-grid</span><span class="hl-1"> { </span><span class="hl-12">--ag-grid-shadow</span><span class="hl-1">: </span><span class="hl-14">none</span><span class="hl-1">; } </span><span class="hl-15">/* remove the edge entirely */</span>
|
|
65
72
|
</code><button type="button">Copy</button></pre>
|
|
66
73
|
|
|
67
|
-
<p>If you embed the grid alongside <code>igniteui-webcomponents</code>, the brand tokens automatically re-tint from the igniteui palette (<code>--ig-primary-500</code>)
|
|
74
|
+
<p>If you embed the grid alongside <code>igniteui-webcomponents</code>, the brand tokens automatically re-tint from the igniteui palette (<code>--ig-primary-500</code>); no configuration needed.</p>
|
|
68
75
|
<h3 id="4-size-the-host" class="tsd-anchor-link">4. Size the host<a href="#4-size-the-host" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
69
76
|
<p><code>@lit-labs/virtualizer</code> requires a <strong>bounded height</strong>. Without one, the virtualizer collapses to its natural content height (~150px) and only a few rows ever render.</p>
|
|
70
77
|
<pre><code class="css"><span class="hl-10">apex-grid</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-12">height</span><span class="hl-1">: </span><span class="hl-8">480px</span><span class="hl-1">; </span><span class="hl-15">/* any explicit pixel height; % works if the parent has a height */</span><br/><span class="hl-1">}</span>
|
|
@@ -83,7 +90,7 @@
|
|
|
83
90
|
<li><strong>Sort arrows</strong> (↕) next to each header when <code>sort: true</code>.</li>
|
|
84
91
|
<li>A <strong>filter row</strong> below the headers with a "Filter" chip per column when <code>filter: true</code>.</li>
|
|
85
92
|
<li><strong>Hover state</strong> on rows.</li>
|
|
86
|
-
<li><strong>Smooth scrolling</strong
|
|
93
|
+
<li><strong>Smooth scrolling</strong>: DevTools shows only ~20 <code><apex-grid-row></code> elements at any time.</li>
|
|
87
94
|
</ul>
|
|
88
95
|
<h3 id="troubleshooting" class="tsd-anchor-link">Troubleshooting<a href="#troubleshooting" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
89
96
|
<table>
|
|
@@ -96,35 +103,37 @@
|
|
|
96
103
|
<tbody>
|
|
97
104
|
<tr>
|
|
98
105
|
<td>Want a different look / brand color</td>
|
|
99
|
-
<td>Step 3
|
|
106
|
+
<td>Step 3: override the <code>--ag-*</code> CSS variables</td>
|
|
100
107
|
</tr>
|
|
101
108
|
<tr>
|
|
102
109
|
<td>Only ~3 rows visible regardless of data size</td>
|
|
103
|
-
<td>Step 4
|
|
110
|
+
<td>Step 4: no bounded height, <strong>or</strong> consumer CSS sets <code>display</code> on <code><apex-grid></code> (check console for the warning)</td>
|
|
104
111
|
</tr>
|
|
105
112
|
<tr>
|
|
106
113
|
<td><code><apex-grid></code> blank tag in DOM</td>
|
|
107
|
-
<td>Step 2
|
|
114
|
+
<td>Step 2: element not registered</td>
|
|
108
115
|
</tr>
|
|
109
116
|
<tr>
|
|
110
117
|
<td>Columns shown as literal <code>[object Object]</code></td>
|
|
111
|
-
<td><code>columns=</code> used as an attribute
|
|
118
|
+
<td><code>columns=</code> used as an attribute; must be a <strong>property</strong> (<code>.columns=${...}</code> in Lit, <code>[columns]=</code> in Angular, <code>:columns.prop=</code> in Vue, <code>el.columns = ...</code> in vanilla JS)</td>
|
|
112
119
|
</tr>
|
|
113
120
|
</tbody>
|
|
114
121
|
</table>
|
|
115
122
|
<hr>
|
|
116
123
|
<h2 id="features-in-depth" class="tsd-anchor-link">Features in depth<a href="#features-in-depth" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
117
|
-
<p>Each feature below is fully opt-in
|
|
124
|
+
<p>Each feature below is fully opt-in: you only pay for what you turn on. Snippets assume <code>const grid = document.querySelector('apex-grid')!</code>.</p>
|
|
118
125
|
<h3 id="sorting" class="tsd-anchor-link">Sorting<a href="#sorting" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
119
126
|
<pre><code class="ts"><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-7">columns</span><span class="hl-1"> = [</span><br/><span class="hl-1"> { </span><span class="hl-2">key:</span><span class="hl-1"> </span><span class="hl-3">'name'</span><span class="hl-1">, </span><span class="hl-2">sort:</span><span class="hl-1"> </span><span class="hl-5">true</span><span class="hl-1"> }, </span><span class="hl-15">// UI sort + tri-state</span><br/><span class="hl-1"> { </span><span class="hl-2">key:</span><span class="hl-1"> </span><span class="hl-3">'age'</span><span class="hl-1">, </span><span class="hl-2">sort:</span><span class="hl-1"> { </span><span class="hl-2">direction:</span><span class="hl-1"> </span><span class="hl-3">'desc'</span><span class="hl-1"> } }, </span><span class="hl-15">// initial state</span><br/><span class="hl-1">];</span><br/><br/><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-2">sortConfiguration</span><span class="hl-1"> = { </span><span class="hl-2">multiple:</span><span class="hl-1"> </span><span class="hl-5">true</span><span class="hl-1">, </span><span class="hl-2">triState:</span><span class="hl-1"> </span><span class="hl-5">true</span><span class="hl-1"> };</span><br/><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">sort</span><span class="hl-1">({ </span><span class="hl-2">key:</span><span class="hl-1"> </span><span class="hl-3">'age'</span><span class="hl-1">, </span><span class="hl-2">direction:</span><span class="hl-1"> </span><span class="hl-3">'asc'</span><span class="hl-1"> });</span><br/><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">clearSort</span><span class="hl-1">(); </span><span class="hl-15">// or grid.clearSort('age')</span>
|
|
120
127
|
</code><button type="button">Copy</button></pre>
|
|
121
128
|
|
|
122
|
-
<p>Events: <code>sorting</code> (cancellable), <code>sorted</code>.</p>
|
|
129
|
+
<p>When <code>multiple</code> is enabled, a plain header click sorts by that column alone; hold Ctrl/Cmd and click to append additional columns as lower-priority sort keys. Events: <code>sorting</code> (cancellable), <code>sorted</code>.</p>
|
|
130
|
+
<p>Columns show a column menu (the three-dot / kebab button) in the header. Out of the box it offers <strong>Sort Ascending</strong>, <strong>Sort Descending</strong>, and <strong>Autosize Column</strong> (on sortable or resizable columns). A feature module can supply the menu instead through the <code>ColumnMenuProvider</code> seam: <code>apex-grid-enterprise</code> fills it with pin, hide, group, and chart actions on every column, shared with the right-click context menu. The button is always visible; set <code>columnMenu</code> to <code>false</code> to hide it entirely (a module's menu stays reachable by right-click).</p>
|
|
123
131
|
<h3 id="filtering" class="tsd-anchor-link">Filtering<a href="#filtering" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
124
132
|
<pre><code class="ts"><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-7">columns</span><span class="hl-1"> = [</span><br/><span class="hl-1"> { </span><span class="hl-2">key:</span><span class="hl-1"> </span><span class="hl-3">'name'</span><span class="hl-1">, </span><span class="hl-2">filter:</span><span class="hl-1"> </span><span class="hl-5">true</span><span class="hl-1"> }, </span><span class="hl-15">// UI filter chip</span><br/><span class="hl-1"> { </span><span class="hl-2">key:</span><span class="hl-1"> </span><span class="hl-3">'age'</span><span class="hl-1">, </span><span class="hl-2">filter:</span><span class="hl-1"> </span><span class="hl-5">true</span><span class="hl-1">, </span><span class="hl-2">type:</span><span class="hl-1"> </span><span class="hl-3">'number'</span><span class="hl-1"> }, </span><span class="hl-15">// operands by type</span><br/><span class="hl-1">];</span><br/><br/><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">StringOperands</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'apex-grid'</span><span class="hl-1">;</span><br/><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">filter</span><span class="hl-1">({ </span><span class="hl-2">key:</span><span class="hl-1"> </span><span class="hl-3">'name'</span><span class="hl-1">, </span><span class="hl-2">condition:</span><span class="hl-1"> </span><span class="hl-2">StringOperands</span><span class="hl-1">.</span><span class="hl-2">contains</span><span class="hl-1">, </span><span class="hl-2">searchTerm:</span><span class="hl-1"> </span><span class="hl-3">'Ada'</span><span class="hl-1"> });</span><br/><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">clearFilter</span><span class="hl-1">();</span>
|
|
125
133
|
</code><button type="button">Copy</button></pre>
|
|
126
134
|
|
|
127
135
|
<p>Operand classes: <code>StringOperands</code>, <code>NumberOperands</code>, <code>BooleanOperands</code>. Events: <code>filtering</code> (cancellable), <code>filtered</code>.</p>
|
|
136
|
+
<p>Filterable columns show a per-column filter button in the header that opens the filter panel; an active filter is highlighted (with a count badge when more than one condition is set).</p>
|
|
128
137
|
<h3 id="quick-filter-global-search" class="tsd-anchor-link">Quick filter (global search)<a href="#quick-filter-global-search" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
129
138
|
<pre><code class="ts"><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-2">showQuickFilter</span><span class="hl-1"> = </span><span class="hl-5">true</span><span class="hl-1">; </span><span class="hl-15">// renders the toolbar input</span><br/><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-2">quickFilter</span><span class="hl-1"> = </span><span class="hl-3">'ada'</span><span class="hl-1">; </span><span class="hl-15">// or: await grid.setQuickFilter('ada')</span>
|
|
130
139
|
</code><button type="button">Copy</button></pre>
|
|
@@ -143,7 +152,7 @@
|
|
|
143
152
|
<pre><code class="ts"><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-7">columns</span><span class="hl-1"> = [</span><br/><span class="hl-1"> { </span><span class="hl-2">key:</span><span class="hl-1"> </span><span class="hl-3">'id'</span><span class="hl-1">, </span><span class="hl-2">pinned:</span><span class="hl-1"> </span><span class="hl-3">'start'</span><span class="hl-1"> },</span><br/><span class="hl-1"> { </span><span class="hl-2">key:</span><span class="hl-1"> </span><span class="hl-3">'name'</span><span class="hl-1"> },</span><br/><span class="hl-1"> { </span><span class="hl-2">key:</span><span class="hl-1"> </span><span class="hl-3">'actions'</span><span class="hl-1">, </span><span class="hl-2">pinned:</span><span class="hl-1"> </span><span class="hl-3">'end'</span><span class="hl-1"> },</span><br/><span class="hl-1">];</span><br/><br/><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">pinColumn</span><span class="hl-1">(</span><span class="hl-3">'name'</span><span class="hl-1">, </span><span class="hl-3">'start'</span><span class="hl-1">);</span><br/><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">unpinColumn</span><span class="hl-1">(</span><span class="hl-3">'name'</span><span class="hl-1">); </span><span class="hl-15">// or pinColumn('name', null)</span>
|
|
144
153
|
</code><button type="button">Copy</button></pre>
|
|
145
154
|
|
|
146
|
-
<p>The source <code>columns</code> array is <strong>not</strong> reordered
|
|
155
|
+
<p>The source <code>columns</code> array is <strong>not</strong> reordered; only the visual render order changes. Read <code>grid.displayColumns</code> for the render order. Events: <code>columnPinning</code> (cancellable), <code>columnPinned</code>.</p>
|
|
147
156
|
<h3 id="column-reordering" class="tsd-anchor-link">Column reordering<a href="#column-reordering" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
148
157
|
<pre><code class="html"><span class="hl-9"><</span><span class="hl-10">apex-grid</span><span class="hl-1"> </span><span class="hl-12">column-reordering</span><span class="hl-9">></</span><span class="hl-10">apex-grid</span><span class="hl-9">></span>
|
|
149
158
|
</code><button type="button">Copy</button></pre>
|
|
@@ -153,24 +162,55 @@
|
|
|
153
162
|
</code><button type="button">Copy</button></pre>
|
|
154
163
|
|
|
155
164
|
<p>Per-column opt-out: <code>{ key: 'id', reorderable: false }</code>. Reordering is constrained to the column's own pinning group (start / unpinned / end). Events: <code>columnMoving</code> (cancellable), <code>columnMoved</code>. Attribute: <code>column-reordering</code>.</p>
|
|
165
|
+
<h3 id="column-separators" class="tsd-anchor-link">Column separators<a href="#column-separators" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
166
|
+
<p>A persistent vertical divider on each column header's trailing edge, on by default. On columns that opt into resizing (<code>{ key, resizable: true }</code>) the divider doubles as the resize handle: it takes the <code>col-resize</code> cursor and can be dragged.</p>
|
|
167
|
+
<pre><code class="ts"><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-2">columnSeparator</span><span class="hl-1"> = </span><span class="hl-5">false</span><span class="hl-1">; </span><span class="hl-15">// hide the dividers</span>
|
|
168
|
+
</code><button type="button">Copy</button></pre>
|
|
169
|
+
|
|
170
|
+
<p>Theme the line with <code>--ag-header-separator</code> (or the <code>--header-separator-color</code> / <code>--igx-header-separator-color</code> override hooks) and set its vertical inset with <code>--apex-header-separator-inset</code>. Because the default is <code>true</code>, disable it through the property rather than markup (a default-on boolean attribute cannot be turned off by attribute alone). Attribute: <code>column-separator</code>.</p>
|
|
171
|
+
<h3 id="column-groups-spanning-headers" class="tsd-anchor-link">Column groups (spanning headers)<a href="#column-groups-spanning-headers" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
172
|
+
<pre><code class="ts"><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-7">columns</span><span class="hl-1"> = [</span><br/><span class="hl-1"> { </span><span class="hl-2">key:</span><span class="hl-1"> </span><span class="hl-3">'first'</span><span class="hl-1">, </span><span class="hl-2">group:</span><span class="hl-1"> </span><span class="hl-3">'name'</span><span class="hl-1"> },</span><br/><span class="hl-1"> { </span><span class="hl-2">key:</span><span class="hl-1"> </span><span class="hl-3">'last'</span><span class="hl-1">, </span><span class="hl-2">group:</span><span class="hl-1"> </span><span class="hl-3">'name'</span><span class="hl-1"> },</span><br/><span class="hl-1"> { </span><span class="hl-2">key:</span><span class="hl-1"> </span><span class="hl-3">'city'</span><span class="hl-1">, </span><span class="hl-2">group:</span><span class="hl-1"> </span><span class="hl-3">'address'</span><span class="hl-1"> },</span><br/><span class="hl-1"> { </span><span class="hl-2">key:</span><span class="hl-1"> </span><span class="hl-3">'zip'</span><span class="hl-1">, </span><span class="hl-2">group:</span><span class="hl-1"> </span><span class="hl-3">'address'</span><span class="hl-1"> },</span><br/><span class="hl-1">];</span><br/><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-2">columnGroups</span><span class="hl-1"> = [</span><br/><span class="hl-1"> { </span><span class="hl-2">id:</span><span class="hl-1"> </span><span class="hl-3">'name'</span><span class="hl-1">, </span><span class="hl-2">headerText:</span><span class="hl-1"> </span><span class="hl-3">'Name'</span><span class="hl-1"> },</span><br/><span class="hl-1"> { </span><span class="hl-2">id:</span><span class="hl-1"> </span><span class="hl-3">'address'</span><span class="hl-1">, </span><span class="hl-2">headerText:</span><span class="hl-1"> </span><span class="hl-3">'Address'</span><span class="hl-1"> },</span><br/><span class="hl-1">];</span>
|
|
173
|
+
</code><button type="button">Copy</button></pre>
|
|
174
|
+
|
|
175
|
+
<p>A spanning header row renders above the column headers. <code>columns</code> stays flat, so width / pinning / resize / reorder are unaffected; membership is by reference (<code>column.group</code> points at a <code>columnGroups</code> entry). A group's members must be contiguous within one pin region (non-contiguous groups warn and skip the spanning cell); ungrouped columns get a blank spacer. Member reordering is confined to its group.</p>
|
|
156
176
|
<h3 id="inline-editing" class="tsd-anchor-link">Inline editing<a href="#inline-editing" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
157
177
|
<pre><code class="ts"><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-7">columns</span><span class="hl-1"> = [</span><br/><span class="hl-1"> { </span><span class="hl-2">key:</span><span class="hl-1"> </span><span class="hl-3">'name'</span><span class="hl-1">, </span><span class="hl-2">editable:</span><span class="hl-1"> </span><span class="hl-5">true</span><span class="hl-1"> },</span><br/><span class="hl-1"> { </span><span class="hl-2">key:</span><span class="hl-1"> </span><span class="hl-3">'age'</span><span class="hl-1">, </span><span class="hl-2">editable:</span><span class="hl-1"> </span><span class="hl-5">true</span><span class="hl-1">, </span><span class="hl-2">type:</span><span class="hl-1"> </span><span class="hl-3">'number'</span><span class="hl-1"> },</span><br/><span class="hl-1">];</span><br/><br/><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-2">editing</span><span class="hl-1"> = { </span><span class="hl-2">enabled:</span><span class="hl-1"> </span><span class="hl-5">true</span><span class="hl-1">, </span><span class="hl-2">mode:</span><span class="hl-1"> </span><span class="hl-3">'cell'</span><span class="hl-1">, </span><span class="hl-2">trigger:</span><span class="hl-1"> </span><span class="hl-3">'doubleClick'</span><span class="hl-1"> };</span><br/><br/><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">editCell</span><span class="hl-1">(</span><span class="hl-8">0</span><span class="hl-1">, </span><span class="hl-3">'name'</span><span class="hl-1">);</span><br/><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">commitEdit</span><span class="hl-1">();</span><br/><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">cancelEdit</span><span class="hl-1">();</span>
|
|
158
178
|
</code><button type="button">Copy</button></pre>
|
|
159
179
|
|
|
160
180
|
<p><code>mode: 'row'</code> puts all editable cells in the row into edit together. Properties: <code>editingCell</code>, <code>editingRow</code>. Events: <code>cellValueChanging</code> (cancellable), <code>cellValueChanged</code>, plus <code>rowEditStarted</code> / <code>rowEditEnded</code> in row mode.</p>
|
|
181
|
+
<h3 id="cell-validation" class="tsd-anchor-link">Cell validation<a href="#cell-validation" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
182
|
+
<pre><code class="ts"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">required</span><span class="hl-1">, </span><span class="hl-2">min</span><span class="hl-1">, </span><span class="hl-2">max</span><span class="hl-1">, </span><span class="hl-2">pattern</span><span class="hl-1">, </span><span class="hl-2">custom</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'apex-grid'</span><span class="hl-1">;</span><br/><br/><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-7">columns</span><span class="hl-1"> = [</span><br/><span class="hl-1"> { </span><span class="hl-2">key:</span><span class="hl-1"> </span><span class="hl-3">'name'</span><span class="hl-1">, </span><span class="hl-2">editable:</span><span class="hl-1"> </span><span class="hl-5">true</span><span class="hl-1">, </span><span class="hl-2">validators:</span><span class="hl-1"> [</span><span class="hl-4">required</span><span class="hl-1">(</span><span class="hl-3">'Name is required'</span><span class="hl-1">)] },</span><br/><span class="hl-1"> { </span><span class="hl-2">key:</span><span class="hl-1"> </span><span class="hl-3">'age'</span><span class="hl-1">, </span><span class="hl-2">editable:</span><span class="hl-1"> </span><span class="hl-5">true</span><span class="hl-1">, </span><span class="hl-2">type:</span><span class="hl-1"> </span><span class="hl-3">'number'</span><span class="hl-1">, </span><span class="hl-2">validators:</span><span class="hl-1"> [</span><span class="hl-4">min</span><span class="hl-1">(</span><span class="hl-8">18</span><span class="hl-1">), </span><span class="hl-4">max</span><span class="hl-1">(</span><span class="hl-8">99</span><span class="hl-1">)] },</span><br/><span class="hl-1"> { </span><span class="hl-2">key:</span><span class="hl-1"> </span><span class="hl-3">'email'</span><span class="hl-1">, </span><span class="hl-2">editable:</span><span class="hl-1"> </span><span class="hl-5">true</span><span class="hl-1">, </span><span class="hl-2">validators:</span><span class="hl-1"> [</span><span class="hl-4">pattern</span><span class="hl-1">(</span><span class="hl-16">/</span><span class="hl-17">^</span><span class="hl-18">[^</span><span class="hl-16">@\s</span><span class="hl-18">]</span><span class="hl-19">+</span><span class="hl-16">@</span><span class="hl-18">[^</span><span class="hl-16">@\s</span><span class="hl-18">]</span><span class="hl-19">+</span><span class="hl-17">$</span><span class="hl-16">/</span><span class="hl-1">, </span><span class="hl-3">'Invalid email'</span><span class="hl-1">)] },</span><br/><span class="hl-1">];</span>
|
|
183
|
+
</code><button type="button">Copy</button></pre>
|
|
184
|
+
|
|
185
|
+
<p>Validators run inside the commit path, before the cancellable <code>cellValueChanging</code> gate. A failure keeps the editor open, marks the cell (<code>aria-invalid</code> + an error message node), and fires <code>cellValidationFailed { key, rowIndex, data, value, errors }</code>. Built-ins: <code>required</code>, <code>min</code>, <code>max</code>, <code>pattern</code>, <code>custom</code>, or any <code>(value, ctx) => string | null</code>. In row mode all pending cells are validated atomically (no partial write); enterprise paste / fill validate per cell.</p>
|
|
186
|
+
<h3 id="undo-redo" class="tsd-anchor-link">Undo / redo<a href="#undo-redo" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
187
|
+
<pre><code class="ts"><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-2">editing</span><span class="hl-1"> = { </span><span class="hl-2">enabled:</span><span class="hl-1"> </span><span class="hl-5">true</span><span class="hl-1">, </span><span class="hl-2">mode:</span><span class="hl-1"> </span><span class="hl-3">'cell'</span><span class="hl-1">, </span><span class="hl-2">history:</span><span class="hl-1"> { </span><span class="hl-2">enabled:</span><span class="hl-1"> </span><span class="hl-5">true</span><span class="hl-1"> } };</span><br/><br/><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">undo</span><span class="hl-1">(); </span><span class="hl-15">// or Ctrl/Cmd+Z</span><br/><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">redo</span><span class="hl-1">(); </span><span class="hl-15">// or Ctrl/Cmd+Shift+Z / Ctrl+Y</span><br/><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">clearHistory</span><span class="hl-1">();</span><br/><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-2">canUndo</span><span class="hl-1">; </span><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-2">canRedo</span><span class="hl-1">;</span>
|
|
188
|
+
</code><button type="button">Copy</button></pre>
|
|
189
|
+
|
|
190
|
+
<p>Opt in via <code>editing.history</code>. Every committed cell edit is recorded (single, row-mode, and enterprise paste / fill collapse to one step). Keyboard shortcuts work while the grid body has focus, so an open editor's native undo is untouched. The stack holds 100 commands by default (<code>history: { enabled: true, stackSize: 200 }</code>). Event: <code>historyChanged { canUndo, canRedo }</code>.</p>
|
|
161
191
|
<h3 id="row-selection" class="tsd-anchor-link">Row selection<a href="#row-selection" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
162
192
|
<pre><code class="ts"><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-2">selection</span><span class="hl-1"> = { </span><span class="hl-2">enabled:</span><span class="hl-1"> </span><span class="hl-5">true</span><span class="hl-1">, </span><span class="hl-2">mode:</span><span class="hl-1"> </span><span class="hl-3">'multiple'</span><span class="hl-1">, </span><span class="hl-2">showCheckboxColumn:</span><span class="hl-1"> </span><span class="hl-5">true</span><span class="hl-1"> };</span><br/><br/><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">selectRow</span><span class="hl-1">(</span><span class="hl-2">data</span><span class="hl-1">[</span><span class="hl-8">0</span><span class="hl-1">]);</span><br/><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">toggleRowSelection</span><span class="hl-1">(</span><span class="hl-2">data</span><span class="hl-1">[</span><span class="hl-8">1</span><span class="hl-1">]);</span><br/><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">selectAllRows</span><span class="hl-1">();</span><br/><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">clearSelection</span><span class="hl-1">();</span><br/><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-2">selectedRows</span><span class="hl-1">; </span><span class="hl-15">// snapshot</span><br/><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-2">selectedRows</span><span class="hl-1"> = [</span><span class="hl-2">data</span><span class="hl-1">[</span><span class="hl-8">2</span><span class="hl-1">]]; </span><span class="hl-15">// replace selection (goes through `rowSelecting`)</span>
|
|
163
193
|
</code><button type="button">Copy</button></pre>
|
|
164
194
|
|
|
165
195
|
<p>Events: <code>rowSelecting</code> (cancellable), <code>rowSelected</code>.</p>
|
|
196
|
+
<h3 id="row-pinning-top-bottom" class="tsd-anchor-link">Row pinning (top / bottom)<a href="#row-pinning-top-bottom" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
197
|
+
<pre><code class="ts"><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-2">rowPinning</span><span class="hl-1"> = { </span><span class="hl-2">enabled:</span><span class="hl-1"> </span><span class="hl-5">true</span><span class="hl-1"> };</span><br/><br/><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">pinRow</span><span class="hl-1">(</span><span class="hl-2">data</span><span class="hl-1">[</span><span class="hl-8">0</span><span class="hl-1">], </span><span class="hl-3">'top'</span><span class="hl-1">);</span><br/><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">pinRow</span><span class="hl-1">(</span><span class="hl-2">data</span><span class="hl-1">[</span><span class="hl-8">5</span><span class="hl-1">], </span><span class="hl-3">'bottom'</span><span class="hl-1">);</span><br/><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">unpinRow</span><span class="hl-1">(</span><span class="hl-2">data</span><span class="hl-1">[</span><span class="hl-8">0</span><span class="hl-1">]);</span><br/><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-2">pinnedRows</span><span class="hl-1">; </span><span class="hl-15">// { top: T[], bottom: T[] }</span>
|
|
198
|
+
</code><button type="button">Copy</button></pre>
|
|
199
|
+
|
|
200
|
+
<p>Pinned rows render in sticky top / bottom bands outside the virtualizer and are lifted out of the scrollable set (no duplication). Selection and styling work by row reference. Events: <code>rowPinning</code> (cancellable), <code>rowPinned</code>.</p>
|
|
201
|
+
<h3 id="row-drag-reorder" class="tsd-anchor-link">Row drag-reorder<a href="#row-drag-reorder" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
202
|
+
<pre><code class="ts"><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-2">rowReordering</span><span class="hl-1"> = { </span><span class="hl-2">enabled:</span><span class="hl-1"> </span><span class="hl-5">true</span><span class="hl-1"> }; </span><span class="hl-15">// add applyToData: true to splice grid.data in place</span><br/><br/><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">moveRow</span><span class="hl-1">(</span><span class="hl-8">0</span><span class="hl-1">, </span><span class="hl-8">4</span><span class="hl-1">, </span><span class="hl-3">'after'</span><span class="hl-1">);</span>
|
|
203
|
+
</code><button type="button">Copy</button></pre>
|
|
204
|
+
|
|
205
|
+
<p>By default (<code>rowReordering.handle</code>, boolean, default <code>true</code>) a six-dot grip handle shows at the start of every reorderable row, and dragging lifts a full-row floating ghost that follows the cursor. Both interaction modes are supported: <strong>handle mode</strong> (only the grip starts a drag, so the rest of the row stays free for selection and editing) and <strong>whole-row mode</strong> (set <code>handle: false</code> to drag from anywhere on the row, excluding interactive sub-parts like inputs and buttons). Or use the keyboard: focus a row, <strong>Space</strong> to grab, <strong>Arrow</strong> keys to move, <strong>Space / Enter</strong> to drop, <strong>Esc</strong> to cancel. The grid holds a manual order that is mutually exclusive with sorting (applying a sort clears it). By default the app persists the order via the <code>rowMoved</code> event; set <code>applyToData: true</code> to splice <code>grid.data</code> directly. Events: <code>rowMoving</code> (cancellable), <code>rowMoved { from, to, data }</code>.</p>
|
|
166
206
|
<h3 id="row-expansion-master-detail" class="tsd-anchor-link">Row expansion (master-detail)<a href="#row-expansion-master-detail" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
167
207
|
<pre><code class="ts"><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-2">expansion</span><span class="hl-1"> = {</span><br/><span class="hl-1"> </span><span class="hl-2">enabled:</span><span class="hl-1"> </span><span class="hl-5">true</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">detailTemplate</span><span class="hl-2">:</span><span class="hl-1"> ({ </span><span class="hl-2">data</span><span class="hl-1"> }) </span><span class="hl-5">=></span><span class="hl-1"> </span><span class="hl-4">html</span><span class="hl-3">`<order-summary .order=</span><span class="hl-5">${</span><span class="hl-2">data</span><span class="hl-5">}</span><span class="hl-3">></order-summary>`</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">isExpandable</span><span class="hl-2">:</span><span class="hl-1"> (</span><span class="hl-2">row</span><span class="hl-1">) </span><span class="hl-5">=></span><span class="hl-1"> </span><span class="hl-2">row</span><span class="hl-1">.</span><span class="hl-2">hasDetails</span><span class="hl-1">,</span><br/><span class="hl-1">};</span><br/><br/><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">expandRow</span><span class="hl-1">(</span><span class="hl-2">data</span><span class="hl-1">[</span><span class="hl-8">0</span><span class="hl-1">]);</span><br/><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">toggleRowExpansion</span><span class="hl-1">(</span><span class="hl-2">data</span><span class="hl-1">[</span><span class="hl-8">0</span><span class="hl-1">]);</span><br/><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">expandAllRows</span><span class="hl-1">();</span><br/><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">collapseAllRows</span><span class="hl-1">();</span><br/><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-2">expandedRows</span><span class="hl-1">; </span><span class="hl-15">// snapshot</span>
|
|
168
208
|
</code><button type="button">Copy</button></pre>
|
|
169
209
|
|
|
170
210
|
<p>Events: <code>rowExpanding</code> (cancellable), <code>rowExpanded</code>.</p>
|
|
171
211
|
<h3 id="tree-data-nested-rows" class="tsd-anchor-link">Tree data (nested rows)<a href="#tree-data-nested-rows" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
172
|
-
<p>The data array stays <strong>flat</strong>. The grid derives the hierarchy from a <code>getDataPath(row)</code> callback that returns the path from root to that row
|
|
173
|
-
<pre><code class="ts"><span class="hl-5">type</span><span class="hl-1"> </span><span class="hl-6">Person</span><span class="hl-1"> = { </span><span class="hl-2">id</span><span class="hl-1">: </span><span class="hl-6">number</span><span class="hl-1">; </span><span class="hl-2">name</span><span class="hl-1">: </span><span class="hl-6">string</span><span class="hl-1">; </span><span class="hl-2">title</span><span class="hl-1">: </span><span class="hl-6">string</span><span class="hl-1">; </span><span class="hl-2">path</span><span class="hl-1">: </span><span class="hl-6">string</span><span class="hl-1">[] };</span><br/><br/><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-7">data</span><span class="hl-1">: </span><span class="hl-6">Person</span><span class="hl-1">[] = [</span><br/><span class="hl-1"> { </span><span class="hl-2">id:</span><span class="hl-1"> </span><span class="hl-8">1</span><span class="hl-1">, </span><span class="hl-2">name:</span><span class="hl-1"> </span><span class="hl-3">'Adrian'</span><span class="hl-1">, </span><span class="hl-2">title:</span><span class="hl-1"> </span><span class="hl-3">'CEO'</span><span class="hl-1">, </span><span class="hl-2">path:</span><span class="hl-1"> [</span><span class="hl-3">'Adrian'</span><span class="hl-1">] },</span><br/><span class="hl-1"> { </span><span class="hl-2">id:</span><span class="hl-1"> </span><span class="hl-8">2</span><span class="hl-1">, </span><span class="hl-2">name:</span><span class="hl-1"> </span><span class="hl-3">'Bryan'</span><span class="hl-1">, </span><span class="hl-2">title:</span><span class="hl-1"> </span><span class="hl-3">'VP Eng'</span><span class="hl-1">, </span><span class="hl-2">path:</span><span class="hl-1"> [</span><span class="hl-3">'Adrian'</span><span class="hl-1">, </span><span class="hl-3">'Bryan'</span><span class="hl-1">] },</span><br/><span class="hl-1"> { </span><span class="hl-2">id:</span><span class="hl-1"> </span><span class="hl-8">3</span><span class="hl-1">, </span><span class="hl-2">name:</span><span class="hl-1"> </span><span class="hl-3">'Cara'</span><span class="hl-1">, </span><span class="hl-2">title:</span><span class="hl-1"> </span><span class="hl-3">'Manager'</span><span class="hl-1">, </span><span class="hl-2">path:</span><span class="hl-1"> [</span><span class="hl-3">'Adrian'</span><span class="hl-1">, </span><span class="hl-3">'Bryan'</span><span class="hl-1">, </span><span class="hl-3">'Cara'</span><span class="hl-1">] },</span><br/><span class="hl-1">];</span><br/><br/><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-2">tree</span><span class="hl-1"> = {</span><br/><span class="hl-1"> </span><span class="hl-2">enabled:</span><span class="hl-1"> </span><span class="hl-5">true</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">getDataPath</span><span class="hl-2">:</span><span class="hl-1"> (</span><span class="hl-2">row</span><span class="hl-1">) </span><span class="hl-5">=></span><span class="hl-1"> </span><span class="hl-2">row</span><span class="hl-1">.</span><span class="hl-2">path</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-2">defaultExpanded:</span><span class="hl-1"> </span><span class="hl-8">1</span><span class="hl-1">, </span><span class="hl-15">// boolean | number
|
|
212
|
+
<p>The data array stays <strong>flat</strong>. The grid derives the hierarchy from a <code>getDataPath(row)</code> callback that returns the path from root to that row, the flat-array "tree data" pattern.</p>
|
|
213
|
+
<pre><code class="ts"><span class="hl-5">type</span><span class="hl-1"> </span><span class="hl-6">Person</span><span class="hl-1"> = { </span><span class="hl-2">id</span><span class="hl-1">: </span><span class="hl-6">number</span><span class="hl-1">; </span><span class="hl-2">name</span><span class="hl-1">: </span><span class="hl-6">string</span><span class="hl-1">; </span><span class="hl-2">title</span><span class="hl-1">: </span><span class="hl-6">string</span><span class="hl-1">; </span><span class="hl-2">path</span><span class="hl-1">: </span><span class="hl-6">string</span><span class="hl-1">[] };</span><br/><br/><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-7">data</span><span class="hl-1">: </span><span class="hl-6">Person</span><span class="hl-1">[] = [</span><br/><span class="hl-1"> { </span><span class="hl-2">id:</span><span class="hl-1"> </span><span class="hl-8">1</span><span class="hl-1">, </span><span class="hl-2">name:</span><span class="hl-1"> </span><span class="hl-3">'Adrian'</span><span class="hl-1">, </span><span class="hl-2">title:</span><span class="hl-1"> </span><span class="hl-3">'CEO'</span><span class="hl-1">, </span><span class="hl-2">path:</span><span class="hl-1"> [</span><span class="hl-3">'Adrian'</span><span class="hl-1">] },</span><br/><span class="hl-1"> { </span><span class="hl-2">id:</span><span class="hl-1"> </span><span class="hl-8">2</span><span class="hl-1">, </span><span class="hl-2">name:</span><span class="hl-1"> </span><span class="hl-3">'Bryan'</span><span class="hl-1">, </span><span class="hl-2">title:</span><span class="hl-1"> </span><span class="hl-3">'VP Eng'</span><span class="hl-1">, </span><span class="hl-2">path:</span><span class="hl-1"> [</span><span class="hl-3">'Adrian'</span><span class="hl-1">, </span><span class="hl-3">'Bryan'</span><span class="hl-1">] },</span><br/><span class="hl-1"> { </span><span class="hl-2">id:</span><span class="hl-1"> </span><span class="hl-8">3</span><span class="hl-1">, </span><span class="hl-2">name:</span><span class="hl-1"> </span><span class="hl-3">'Cara'</span><span class="hl-1">, </span><span class="hl-2">title:</span><span class="hl-1"> </span><span class="hl-3">'Manager'</span><span class="hl-1">, </span><span class="hl-2">path:</span><span class="hl-1"> [</span><span class="hl-3">'Adrian'</span><span class="hl-1">, </span><span class="hl-3">'Bryan'</span><span class="hl-1">, </span><span class="hl-3">'Cara'</span><span class="hl-1">] },</span><br/><span class="hl-1">];</span><br/><br/><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-2">tree</span><span class="hl-1"> = {</span><br/><span class="hl-1"> </span><span class="hl-2">enabled:</span><span class="hl-1"> </span><span class="hl-5">true</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">getDataPath</span><span class="hl-2">:</span><span class="hl-1"> (</span><span class="hl-2">row</span><span class="hl-1">) </span><span class="hl-5">=></span><span class="hl-1"> </span><span class="hl-2">row</span><span class="hl-1">.</span><span class="hl-2">path</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-2">defaultExpanded:</span><span class="hl-1"> </span><span class="hl-8">1</span><span class="hl-1">, </span><span class="hl-15">// boolean | number, depth to expand</span><br/><span class="hl-1"> </span><span class="hl-2">groupColumnKey:</span><span class="hl-1"> </span><span class="hl-3">'name'</span><span class="hl-1">, </span><span class="hl-15">// which column shows the chevron + indent</span><br/><span class="hl-1"> </span><span class="hl-2">childIndent:</span><span class="hl-1"> </span><span class="hl-8">20</span><span class="hl-1">, </span><span class="hl-15">// px per depth level</span><br/><span class="hl-1">};</span><br/><br/><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">toggleTreeRow</span><span class="hl-1">(</span><span class="hl-2">data</span><span class="hl-1">[</span><span class="hl-8">0</span><span class="hl-1">]);</span><br/><span class="hl-0">await</span><span class="hl-1"> </span><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">expandAllTreeRows</span><span class="hl-1">();</span>
|
|
174
214
|
</code><button type="button">Copy</button></pre>
|
|
175
215
|
|
|
176
216
|
<p>Methods: <code>toggleTreeRow</code>, <code>expandTreeRow</code>, <code>collapseTreeRow</code>, <code>expandAllTreeRows</code>, <code>collapseAllTreeRows</code>, <code>isTreeRowExpanded</code>. Events: <code>treeRowExpanding</code> (cancellable), <code>treeRowExpanded</code>. When tree mode is active, the host element advertises <code>role="treegrid"</code>.</p>
|
|
@@ -179,7 +219,7 @@
|
|
|
179
219
|
<pre><code class="ts"><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">exportToCSV</span><span class="hl-1">(); </span><span class="hl-15">// downloads data.csv</span><br/><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">exportToCSV</span><span class="hl-1">({ </span><span class="hl-2">filename:</span><span class="hl-1"> </span><span class="hl-3">'users'</span><span class="hl-1">, </span><span class="hl-2">source:</span><span class="hl-1"> </span><span class="hl-3">'selected'</span><span class="hl-1"> });</span><br/><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-7">text</span><span class="hl-1"> = </span><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">exportToCSV</span><span class="hl-1">({ </span><span class="hl-2">filename:</span><span class="hl-1"> </span><span class="hl-3">''</span><span class="hl-1"> }); </span><span class="hl-15">// no download, returns the string</span>
|
|
180
220
|
</code><button type="button">Copy</button></pre>
|
|
181
221
|
|
|
182
|
-
<p><code>source</code> can be <code>'view'</code> (default
|
|
222
|
+
<p><code>source</code> can be <code>'view'</code> (default, post-filter/post-sort), <code>'page'</code>, <code>'selected'</code>, or <code>'all'</code>. Per-column opt-out: <code>{ key: 'secret', exportable: false }</code>.</p>
|
|
183
223
|
<blockquote>
|
|
184
224
|
<p><strong>XLSX (Excel) export</strong> moved to <a href="https://www.npmjs.com/package/apex-grid-enterprise"><code>apex-grid-enterprise</code></a> in v3. <code><apex-grid-enterprise></code> adds <code>grid.exportToXLSX(...)</code> and an "Export XLSX" entry to this same toolbar menu. CSV stays free.</p>
|
|
185
225
|
</blockquote>
|
|
@@ -234,11 +274,28 @@
|
|
|
234
274
|
</table>
|
|
235
275
|
<p>Search input has a <code>debounce</code> attribute (default <code>200</code>ms).</p>
|
|
236
276
|
<h3 id="theming" class="tsd-anchor-link">Theming<a href="#theming" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
237
|
-
<p>The grid styles itself through <code>--ag-*</code> CSS custom properties
|
|
277
|
+
<p>The grid styles itself through <code>--ag-*</code> CSS custom properties; override them on <code>apex-grid</code> (or any ancestor) to rebrand; see <a href="media/_tokens.scss"><code>src/styles/_tokens.scss</code></a> for the full list. When <code>igniteui-webcomponents</code> is present, the brand tokens auto-tint from its palette.</p>
|
|
238
278
|
<p>Style with CSS parts on the grid, paginator, and toolbar:</p>
|
|
239
279
|
<pre><code class="css"><span class="hl-10">apex-grid</span><span class="hl-1">::part(paginator) { </span><span class="hl-12">background</span><span class="hl-1">: </span><span class="hl-4">var</span><span class="hl-1">(</span><span class="hl-12">--surface-2</span><span class="hl-1">); }</span><br/><span class="hl-10">apex-grid-toolbar</span><span class="hl-1">::part(</span><span class="hl-10">search-input</span><span class="hl-1">) { </span><span class="hl-12">font-family</span><span class="hl-1">: </span><span class="hl-4">var</span><span class="hl-1">(</span><span class="hl-12">--font-mono</span><span class="hl-1">); }</span>
|
|
240
280
|
</code><button type="button">Copy</button></pre>
|
|
241
281
|
|
|
282
|
+
<h3 id="spreadsheet-coordinates" class="tsd-anchor-link">Spreadsheet coordinates<a href="#spreadsheet-coordinates" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
283
|
+
<pre><code class="ts"><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-2">coordinateHints</span><span class="hl-1"> = </span><span class="hl-5">true</span><span class="hl-1">;</span>
|
|
284
|
+
</code><button type="button">Copy</button></pre>
|
|
285
|
+
|
|
286
|
+
<pre><code class="html"><span class="hl-9"><</span><span class="hl-10">apex-grid</span><span class="hl-1"> </span><span class="hl-12">coordinate-hints</span><span class="hl-9">></</span><span class="hl-10">apex-grid</span><span class="hl-9">></span>
|
|
287
|
+
</code><button type="button">Copy</button></pre>
|
|
288
|
+
|
|
289
|
+
<p>When <code>coordinateHints</code> is on, the grid shows a leading row-number gutter (1, 2, 3, and so on) and A / B / C column-letter chips in the headers, so cell references are discoverable (a spreadsheet-style look). Set it directly for a persistent spreadsheet look. <code>apex-grid-enterprise</code> turns it on by default for any grid that has an <code>allowFormula</code> column, so the gutter is reserved up front and entering a formula never shifts the layout. Reflected to the <code>coordinate-hints</code> attribute (default <code>false</code>).</p>
|
|
290
|
+
<h3 id="state-persistence" class="tsd-anchor-link">State & persistence<a href="#state-persistence" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
291
|
+
<p><code>getState()</code> returns a JSON-safe snapshot of the grid's restorable view and <code>setState()</code> applies one back. The snapshot covers column layout (order, width, pinning, visibility), sort, filter, quick filter, pagination, selection, expansion, tree expansion, pinned rows, the manual drag-reorder order, and any feature-module state (enterprise grouping / pivot / aggregation / ranges). Functions and templates are never serialized: sort comparers, filter condition functions, and cell/header/editor templates re-bind from the live <code>columns</code> config on restore (filter conditions are captured by operand name).</p>
|
|
292
|
+
<pre><code class="js"><span class="hl-15">// Save and restore a view.</span><br/><span class="hl-2">localStorage</span><span class="hl-1">.</span><span class="hl-4">setItem</span><span class="hl-1">(</span><span class="hl-3">'view'</span><span class="hl-1">, </span><span class="hl-7">JSON</span><span class="hl-1">.</span><span class="hl-4">stringify</span><span class="hl-1">(</span><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">getState</span><span class="hl-1">()));</span><br/><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">setState</span><span class="hl-1">(</span><span class="hl-7">JSON</span><span class="hl-1">.</span><span class="hl-4">parse</span><span class="hl-1">(</span><span class="hl-2">localStorage</span><span class="hl-1">.</span><span class="hl-4">getItem</span><span class="hl-1">(</span><span class="hl-3">'view'</span><span class="hl-1">)));</span><br/><br/><span class="hl-15">// Persist automatically: stateChanged fires (debounced) after every settled</span><br/><span class="hl-15">// change, and only while something is listening.</span><br/><span class="hl-2">grid</span><span class="hl-1">.</span><span class="hl-4">addEventListener</span><span class="hl-1">(</span><span class="hl-3">'stateChanged'</span><span class="hl-1">, (</span><span class="hl-2">e</span><span class="hl-1">) </span><span class="hl-5">=></span><br/><span class="hl-1"> </span><span class="hl-2">localStorage</span><span class="hl-1">.</span><span class="hl-4">setItem</span><span class="hl-1">(</span><span class="hl-3">'view'</span><span class="hl-1">, </span><span class="hl-7">JSON</span><span class="hl-1">.</span><span class="hl-4">stringify</span><span class="hl-1">(</span><span class="hl-2">e</span><span class="hl-1">.</span><span class="hl-2">detail</span><span class="hl-1">.</span><span class="hl-2">state</span><span class="hl-1">))</span><br/><span class="hl-1">);</span>
|
|
293
|
+
</code><button type="button">Copy</button></pre>
|
|
294
|
+
|
|
295
|
+
<p><strong>Row identity.</strong> Selection, expansion, pinned rows, and the manual order are captured as row references. Set <code>grid.rowId = (row) => row.id</code> for durable references that survive a data reload; without it, rows are referenced by position (index), which round-trips within a session but not across a reload.</p>
|
|
296
|
+
<p><strong><code>setState</code> is defensive.</strong> It is meant to accept persisted-and-possibly-stale blobs and AI output, so it never throws on bad input (unless you pass <code>{ strict: true }</code>): unknown columns / operands are dropped, out-of-range pages clamped, unresolvable rows skipped, and a wrong snapshot <code>version</code> applied best-effort. It returns a <code>SetStateResult</code> (<code>{ applied, skipped, warnings }</code>) so you can see exactly what happened. <code>setState</code> is partial: pass only the slices you want to change.</p>
|
|
297
|
+
<p><strong><code>getSchema()</code></strong> returns a machine-readable description of the grid (columns + data types, available sort directions and filter operands per column, grid-level capabilities) with the current state embedded. It is the contract an AI layer feeds an LLM and validates a patch against, but it equally drives a view-editor UI or documentation.</p>
|
|
298
|
+
<p>See <a href="media/state-persistence.html"><code>demo/state-persistence.html</code></a> for a save / restore / live-snapshot example.</p>
|
|
242
299
|
<hr>
|
|
243
300
|
<h2 id="api-reference" class="tsd-anchor-link">API Reference<a href="#api-reference" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
244
301
|
<h3 id="properties" class="tsd-anchor-link">Properties<a href="#properties" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
@@ -279,13 +336,13 @@
|
|
|
279
336
|
<tr>
|
|
280
337
|
<td><code>dataPipelineConfiguration</code></td>
|
|
281
338
|
<td><code>DataPipelineConfiguration<T></code></td>
|
|
282
|
-
<td
|
|
339
|
+
<td></td>
|
|
283
340
|
<td>Custom sort/filter/pagination hooks</td>
|
|
284
341
|
</tr>
|
|
285
342
|
<tr>
|
|
286
343
|
<td><code>pagination</code></td>
|
|
287
344
|
<td><code>PaginationConfiguration</code></td>
|
|
288
|
-
<td
|
|
345
|
+
<td></td>
|
|
289
346
|
<td></td>
|
|
290
347
|
</tr>
|
|
291
348
|
<tr>
|
|
@@ -313,93 +370,141 @@
|
|
|
313
370
|
<td>Attr <code>column-reordering</code></td>
|
|
314
371
|
</tr>
|
|
315
372
|
<tr>
|
|
373
|
+
<td><code>columnGroups</code></td>
|
|
374
|
+
<td><code>ColumnGroupConfiguration[]</code></td>
|
|
375
|
+
<td></td>
|
|
376
|
+
<td>Spanning header groups (<code>column.group</code> references an <code>id</code>)</td>
|
|
377
|
+
</tr>
|
|
378
|
+
<tr>
|
|
316
379
|
<td><code>editing</code></td>
|
|
317
380
|
<td><code>GridEditingConfiguration</code></td>
|
|
318
|
-
<td>—</td>
|
|
319
381
|
<td></td>
|
|
382
|
+
<td>Includes <code>history</code> for undo/redo; per-column <code>validators</code></td>
|
|
320
383
|
</tr>
|
|
321
384
|
<tr>
|
|
322
385
|
<td><code>selection</code></td>
|
|
323
386
|
<td><code>GridSelectionConfiguration</code></td>
|
|
324
|
-
<td
|
|
387
|
+
<td></td>
|
|
325
388
|
<td></td>
|
|
326
389
|
</tr>
|
|
327
390
|
<tr>
|
|
328
391
|
<td><code>expansion</code></td>
|
|
329
392
|
<td><code>GridExpansionConfiguration<T></code></td>
|
|
330
|
-
<td
|
|
393
|
+
<td></td>
|
|
331
394
|
<td></td>
|
|
332
395
|
</tr>
|
|
333
396
|
<tr>
|
|
334
397
|
<td><code>tree</code></td>
|
|
335
398
|
<td><code>GridTreeConfiguration<T></code></td>
|
|
336
|
-
<td>—</td>
|
|
337
399
|
<td></td>
|
|
400
|
+
<td></td>
|
|
401
|
+
</tr>
|
|
402
|
+
<tr>
|
|
403
|
+
<td><code>rowPinning</code></td>
|
|
404
|
+
<td><code>GridRowPinningConfiguration</code></td>
|
|
405
|
+
<td></td>
|
|
406
|
+
<td><code>{ enabled }</code></td>
|
|
407
|
+
</tr>
|
|
408
|
+
<tr>
|
|
409
|
+
<td><code>rowReordering</code></td>
|
|
410
|
+
<td><code>GridRowReorderingConfiguration</code></td>
|
|
411
|
+
<td></td>
|
|
412
|
+
<td><code>{ enabled, applyToData?, handle? }</code> (<code>handle</code> default <code>true</code>: grip-only drag)</td>
|
|
413
|
+
</tr>
|
|
414
|
+
<tr>
|
|
415
|
+
<td><code>coordinateHints</code></td>
|
|
416
|
+
<td><code>boolean</code></td>
|
|
417
|
+
<td><code>false</code></td>
|
|
418
|
+
<td>Show a row-number gutter + A / B / C header chips (spreadsheet look). Attr <code>coordinate-hints</code></td>
|
|
419
|
+
</tr>
|
|
420
|
+
<tr>
|
|
421
|
+
<td><code>columnMenu</code></td>
|
|
422
|
+
<td><code>boolean</code></td>
|
|
423
|
+
<td><code>true</code></td>
|
|
424
|
+
<td>Show the always-visible column-menu (kebab) button on headers; <code>false</code> hides it</td>
|
|
425
|
+
</tr>
|
|
426
|
+
<tr>
|
|
427
|
+
<td><code>rowId</code></td>
|
|
428
|
+
<td><code>(row: T) => string | number</code></td>
|
|
429
|
+
<td></td>
|
|
430
|
+
<td>Durable row identity for <code>getState</code> / <code>setState</code></td>
|
|
431
|
+
</tr>
|
|
432
|
+
<tr>
|
|
433
|
+
<td><code>localeText</code></td>
|
|
434
|
+
<td><code>GridLocaleText</code></td>
|
|
435
|
+
<td></td>
|
|
436
|
+
<td>Override map for built-in strings (e.g. <code>esLocale</code>)</td>
|
|
437
|
+
</tr>
|
|
438
|
+
<tr>
|
|
439
|
+
<td><code>canUndo</code>, <code>canRedo</code></td>
|
|
440
|
+
<td><code>boolean</code></td>
|
|
441
|
+
<td></td>
|
|
442
|
+
<td>Get (history)</td>
|
|
338
443
|
</tr>
|
|
339
444
|
<tr>
|
|
340
445
|
<td><code>sortExpressions</code></td>
|
|
341
446
|
<td><code>SortExpression<T>[]</code></td>
|
|
342
|
-
<td
|
|
447
|
+
<td></td>
|
|
343
448
|
<td>Get/set</td>
|
|
344
449
|
</tr>
|
|
345
450
|
<tr>
|
|
346
451
|
<td><code>filterExpressions</code></td>
|
|
347
452
|
<td><code>FilterExpression<T>[]</code></td>
|
|
348
|
-
<td
|
|
453
|
+
<td></td>
|
|
349
454
|
<td>Get/set</td>
|
|
350
455
|
</tr>
|
|
351
456
|
<tr>
|
|
352
457
|
<td><code>selectedRows</code></td>
|
|
353
458
|
<td><code>T[]</code></td>
|
|
354
|
-
<td
|
|
459
|
+
<td></td>
|
|
355
460
|
<td>Get/set</td>
|
|
356
461
|
</tr>
|
|
357
462
|
<tr>
|
|
358
463
|
<td><code>expandedRows</code></td>
|
|
359
464
|
<td><code>T[]</code></td>
|
|
360
|
-
<td
|
|
465
|
+
<td></td>
|
|
361
466
|
<td>Get/set</td>
|
|
362
467
|
</tr>
|
|
363
468
|
<tr>
|
|
364
469
|
<td><code>page</code>, <code>pageSize</code>, <code>pageCount</code>, <code>totalItems</code></td>
|
|
365
470
|
<td><code>number</code></td>
|
|
366
|
-
<td
|
|
471
|
+
<td></td>
|
|
367
472
|
<td></td>
|
|
368
473
|
</tr>
|
|
369
474
|
<tr>
|
|
370
475
|
<td><code>pageItems</code></td>
|
|
371
476
|
<td><code>readonly T[]</code></td>
|
|
372
|
-
<td
|
|
477
|
+
<td></td>
|
|
373
478
|
<td>Currently rendered slice</td>
|
|
374
479
|
</tr>
|
|
375
480
|
<tr>
|
|
376
481
|
<td><code>dataView</code></td>
|
|
377
482
|
<td><code>readonly T[]</code></td>
|
|
378
|
-
<td
|
|
483
|
+
<td></td>
|
|
379
484
|
<td>Post-filter, post-sort</td>
|
|
380
485
|
</tr>
|
|
381
486
|
<tr>
|
|
382
487
|
<td><code>displayColumns</code></td>
|
|
383
488
|
<td><code>readonly ColumnConfiguration<T>[]</code></td>
|
|
384
|
-
<td
|
|
489
|
+
<td></td>
|
|
385
490
|
<td>Render order (pinned start → unpinned → pinned end)</td>
|
|
386
491
|
</tr>
|
|
387
492
|
<tr>
|
|
388
493
|
<td><code>editingCell</code></td>
|
|
389
494
|
<td><code>{ rowIndex, columnKey } | null</code></td>
|
|
390
|
-
<td
|
|
495
|
+
<td></td>
|
|
391
496
|
<td></td>
|
|
392
497
|
</tr>
|
|
393
498
|
<tr>
|
|
394
499
|
<td><code>editingRow</code></td>
|
|
395
500
|
<td><code>number | null</code></td>
|
|
396
|
-
<td
|
|
501
|
+
<td></td>
|
|
397
502
|
<td>Row-mode only</td>
|
|
398
503
|
</tr>
|
|
399
504
|
</tbody>
|
|
400
505
|
</table>
|
|
401
506
|
<h3 id="methods" class="tsd-anchor-link">Methods<a href="#methods" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
402
|
-
<pre><code class="ts"><span class="hl-4">sort</span><span class="hl-1">(</span><span class="hl-2">expr</span><span class="hl-1">): </span><span class="hl-5">void</span><br/><span class="hl-4">filter</span><span class="hl-1">(</span><span class="hl-2">expr</span><span class="hl-1">): </span><span class="hl-5">void</span><br/><span class="hl-4">clearSort</span><span class="hl-1">(</span><span class="hl-2">key</span><span class="hl-1">?): </span><span class="hl-5">void</span><br/><span class="hl-4">clearFilter</span><span class="hl-1">(</span><span class="hl-2">key</span><span class="hl-1">?): </span><span class="hl-5">void</span><br/><span class="hl-4">setQuickFilter</span><span class="hl-1">(</span><span class="hl-2">value</span><span class="hl-1">): </span><span class="hl-6">Promise</span><span class="hl-1"><</span><span class="hl-2">boolean</span><span class="hl-1">></span><br/><br/><span class="hl-4">getColumn</span><span class="hl-1">(</span><span class="hl-2">keyOrIndex</span><span class="hl-1">): </span><span class="hl-2">ColumnConfiguration</span><span class="hl-1"><</span><span class="hl-7">T</span><span class="hl-1">> | </span><span class="hl-5">undefined</span><br/><span class="hl-4">updateColumns</span><span class="hl-1">(</span><span class="hl-2">columns</span><span class="hl-1">): </span><span class="hl-5">void</span><br/><span class="hl-4">pinColumn</span><span class="hl-1">(</span><span class="hl-2">key</span><span class="hl-1">, </span><span class="hl-3">'start'</span><span class="hl-1"> | </span><span class="hl-3">'end'</span><span class="hl-1"> | </span><span class="hl-5">null</span><span class="hl-1">): </span><span class="hl-6">Promise</span><span class="hl-1"><</span><span class="hl-2">boolean</span><span class="hl-1">></span><br/><span class="hl-4">unpinColumn</span><span class="hl-1">(</span><span class="hl-2">key</span><span class="hl-1">): </span><span class="hl-6">Promise</span><span class="hl-1"><</span><span class="hl-2">boolean</span><span class="hl-1">></span><br/><span class="hl-4">moveColumn</span><span class="hl-1">(</span><span class="hl-2">fromKey</span><span class="hl-1">, </span><span class="hl-2">toKey</span><span class="hl-1">, </span><span class="hl-3">'before'</span><span class="hl-1"> | </span><span class="hl-3">'after'</span><span class="hl-1">): </span><span class="hl-6">Promise</span><span class="hl-1"><</span><span class="hl-2">boolean</span><span class="hl-1">></span><br/><br/><span class="hl-4">gotoPage</span><span class="hl-1">(</span><span class="hl-2">page</span><span class="hl-1">): </span><span class="hl-6">Promise</span><span class="hl-1"><</span><span class="hl-2">boolean</span><span class="hl-1">></span><br/><span class="hl-4">setPageSize</span><span class="hl-1">(</span><span class="hl-2">size</span><span class="hl-1">): </span><span class="hl-6">Promise</span><span class="hl-1"><</span><span class="hl-2">boolean</span><span class="hl-1">></span><br/><span class="hl-4">nextPage</span><span class="hl-1">(); </span><span class="hl-4">previousPage</span><span class="hl-1">(); </span><span class="hl-4">firstPage</span><span class="hl-1">(); </span><span class="hl-4">lastPage</span><span class="hl-1">()</span><br/><br/><span class="hl-4">editCell</span><span class="hl-1">(</span><span class="hl-2">rowIndex</span><span class="hl-1">, </span><span class="hl-2">columnKey</span><span class="hl-1">): </span><span class="hl-6">Promise</span><span class="hl-1"><</span><span class="hl-2">boolean</span><span class="hl-1">></span><br/><span class="hl-4">editRow</span><span class="hl-1">(</span><span class="hl-2">rowIndex</span><span class="hl-1">): </span><span class="hl-6">Promise</span><span class="hl-1"><</span><span class="hl-2">boolean</span><span class="hl-1">></span><br/><span class="hl-4">commitEdit</span><span class="hl-1">(): </span><span class="hl-6">Promise</span><span class="hl-1"><</span><span class="hl-2">boolean</span><span class="hl-1">></span><br/><span class="hl-4">cancelEdit</span><span class="hl-1">(): </span><span class="hl-5">void</span><br/><br/><span class="hl-4">selectRow</span><span class="hl-1">(</span><span class="hl-2">row</span><span class="hl-1">); </span><span class="hl-4">deselectRow</span><span class="hl-1">(</span><span class="hl-2">row</span><span class="hl-1">); </span><span class="hl-4">toggleRowSelection</span><span class="hl-1">(</span><span class="hl-2">row</span><span class="hl-1">)</span><br/><span class="hl-4">selectAllRows</span><span class="hl-1">(); </span><span class="hl-4">clearSelection</span><span class="hl-1">(); </span><span class="hl-4">isRowSelected</span><span class="hl-1">(</span><span class="hl-2">row</span><span class="hl-1">)</span><br/><br/><span class="hl-4">expandRow</span><span class="hl-1">(</span><span class="hl-2">row</span><span class="hl-1">); </span><span class="hl-4">collapseRow</span><span class="hl-1">(</span><span class="hl-2">row</span><span class="hl-1">); </span><span class="hl-4">toggleRowExpansion</span><span class="hl-1">(</span><span class="hl-2">row</span><span class="hl-1">)</span><br/><span class="hl-4">expandAllRows</span><span class="hl-1">(); </span><span class="hl-4">collapseAllRows</span><span class="hl-1">(); </span><span class="hl-4">isRowExpanded</span><span class="hl-1">(</span><span class="hl-2">row</span><span class="hl-1">)</span><br/><br/><span class="hl-4">toggleTreeRow</span><span class="hl-1">(</span><span class="hl-2">row</span><span class="hl-1">); </span><span class="hl-4">expandTreeRow</span><span class="hl-1">(</span><span class="hl-2">row</span><span class="hl-1">); </span><span class="hl-4">collapseTreeRow</span><span class="hl-1">(</span><span class="hl-2">row</span><span class="hl-1">)</span><br/><span class="hl-4">expandAllTreeRows</span><span class="hl-1">(); </span><span class="hl-4">collapseAllTreeRows</span><span class="hl-1">(); </span><span class="hl-4">isTreeRowExpanded</span><span class="hl-1">(</span><span class="hl-2">row</span><span class="hl-1">)</span><br/><br/><span class="hl-4">exportToCSV</span><span class="hl-1">(</span><span class="hl-2">options</span><span class="hl-1">?): </span><span class="hl-2">string</span><br/><span class="hl-4">exportAs</span><span class="hl-1">(</span><span class="hl-2">formatId</span><span class="hl-1">, </span><span class="hl-2">options</span><span class="hl-1">?): </span><span class="hl-5">void</span><span class="hl-1"> </span><span class="hl-15">// toolbar dispatch; 'csv' (community), 'xlsx' (enterprise)</span>
|
|
507
|
+
<pre><code class="ts"><span class="hl-4">sort</span><span class="hl-1">(</span><span class="hl-2">expr</span><span class="hl-1">): </span><span class="hl-5">void</span><br/><span class="hl-4">filter</span><span class="hl-1">(</span><span class="hl-2">expr</span><span class="hl-1">): </span><span class="hl-5">void</span><br/><span class="hl-4">clearSort</span><span class="hl-1">(</span><span class="hl-2">key</span><span class="hl-1">?): </span><span class="hl-5">void</span><br/><span class="hl-4">clearFilter</span><span class="hl-1">(</span><span class="hl-2">key</span><span class="hl-1">?): </span><span class="hl-5">void</span><br/><span class="hl-4">setQuickFilter</span><span class="hl-1">(</span><span class="hl-2">value</span><span class="hl-1">): </span><span class="hl-6">Promise</span><span class="hl-1"><</span><span class="hl-2">boolean</span><span class="hl-1">></span><br/><br/><span class="hl-4">getColumn</span><span class="hl-1">(</span><span class="hl-2">keyOrIndex</span><span class="hl-1">): </span><span class="hl-2">ColumnConfiguration</span><span class="hl-1"><</span><span class="hl-7">T</span><span class="hl-1">> | </span><span class="hl-5">undefined</span><br/><span class="hl-4">updateColumns</span><span class="hl-1">(</span><span class="hl-2">columns</span><span class="hl-1">): </span><span class="hl-5">void</span><br/><span class="hl-4">pinColumn</span><span class="hl-1">(</span><span class="hl-2">key</span><span class="hl-1">, </span><span class="hl-3">'start'</span><span class="hl-1"> | </span><span class="hl-3">'end'</span><span class="hl-1"> | </span><span class="hl-5">null</span><span class="hl-1">): </span><span class="hl-6">Promise</span><span class="hl-1"><</span><span class="hl-2">boolean</span><span class="hl-1">></span><br/><span class="hl-4">unpinColumn</span><span class="hl-1">(</span><span class="hl-2">key</span><span class="hl-1">): </span><span class="hl-6">Promise</span><span class="hl-1"><</span><span class="hl-2">boolean</span><span class="hl-1">></span><br/><span class="hl-4">moveColumn</span><span class="hl-1">(</span><span class="hl-2">fromKey</span><span class="hl-1">, </span><span class="hl-2">toKey</span><span class="hl-1">, </span><span class="hl-3">'before'</span><span class="hl-1"> | </span><span class="hl-3">'after'</span><span class="hl-1">): </span><span class="hl-6">Promise</span><span class="hl-1"><</span><span class="hl-2">boolean</span><span class="hl-1">></span><br/><br/><span class="hl-4">gotoPage</span><span class="hl-1">(</span><span class="hl-2">page</span><span class="hl-1">): </span><span class="hl-6">Promise</span><span class="hl-1"><</span><span class="hl-2">boolean</span><span class="hl-1">></span><br/><span class="hl-4">setPageSize</span><span class="hl-1">(</span><span class="hl-2">size</span><span class="hl-1">): </span><span class="hl-6">Promise</span><span class="hl-1"><</span><span class="hl-2">boolean</span><span class="hl-1">></span><br/><span class="hl-4">nextPage</span><span class="hl-1">(); </span><span class="hl-4">previousPage</span><span class="hl-1">(); </span><span class="hl-4">firstPage</span><span class="hl-1">(); </span><span class="hl-4">lastPage</span><span class="hl-1">()</span><br/><br/><span class="hl-4">editCell</span><span class="hl-1">(</span><span class="hl-2">rowIndex</span><span class="hl-1">, </span><span class="hl-2">columnKey</span><span class="hl-1">): </span><span class="hl-6">Promise</span><span class="hl-1"><</span><span class="hl-2">boolean</span><span class="hl-1">></span><br/><span class="hl-4">editRow</span><span class="hl-1">(</span><span class="hl-2">rowIndex</span><span class="hl-1">): </span><span class="hl-6">Promise</span><span class="hl-1"><</span><span class="hl-2">boolean</span><span class="hl-1">></span><br/><span class="hl-4">commitEdit</span><span class="hl-1">(): </span><span class="hl-6">Promise</span><span class="hl-1"><</span><span class="hl-2">boolean</span><span class="hl-1">></span><br/><span class="hl-4">cancelEdit</span><span class="hl-1">(): </span><span class="hl-5">void</span><br/><br/><span class="hl-4">selectRow</span><span class="hl-1">(</span><span class="hl-2">row</span><span class="hl-1">); </span><span class="hl-4">deselectRow</span><span class="hl-1">(</span><span class="hl-2">row</span><span class="hl-1">); </span><span class="hl-4">toggleRowSelection</span><span class="hl-1">(</span><span class="hl-2">row</span><span class="hl-1">)</span><br/><span class="hl-4">selectAllRows</span><span class="hl-1">(); </span><span class="hl-4">clearSelection</span><span class="hl-1">(); </span><span class="hl-4">isRowSelected</span><span class="hl-1">(</span><span class="hl-2">row</span><span class="hl-1">)</span><br/><br/><span class="hl-4">expandRow</span><span class="hl-1">(</span><span class="hl-2">row</span><span class="hl-1">); </span><span class="hl-4">collapseRow</span><span class="hl-1">(</span><span class="hl-2">row</span><span class="hl-1">); </span><span class="hl-4">toggleRowExpansion</span><span class="hl-1">(</span><span class="hl-2">row</span><span class="hl-1">)</span><br/><span class="hl-4">expandAllRows</span><span class="hl-1">(); </span><span class="hl-4">collapseAllRows</span><span class="hl-1">(); </span><span class="hl-4">isRowExpanded</span><span class="hl-1">(</span><span class="hl-2">row</span><span class="hl-1">)</span><br/><br/><span class="hl-4">toggleTreeRow</span><span class="hl-1">(</span><span class="hl-2">row</span><span class="hl-1">); </span><span class="hl-4">expandTreeRow</span><span class="hl-1">(</span><span class="hl-2">row</span><span class="hl-1">); </span><span class="hl-4">collapseTreeRow</span><span class="hl-1">(</span><span class="hl-2">row</span><span class="hl-1">)</span><br/><span class="hl-4">expandAllTreeRows</span><span class="hl-1">(); </span><span class="hl-4">collapseAllTreeRows</span><span class="hl-1">(); </span><span class="hl-4">isTreeRowExpanded</span><span class="hl-1">(</span><span class="hl-2">row</span><span class="hl-1">)</span><br/><br/><span class="hl-4">pinRow</span><span class="hl-1">(</span><span class="hl-2">row</span><span class="hl-1">, </span><span class="hl-3">'top'</span><span class="hl-1"> | </span><span class="hl-3">'bottom'</span><span class="hl-1">); </span><span class="hl-4">unpinRow</span><span class="hl-1">(</span><span class="hl-2">row</span><span class="hl-1">) </span><span class="hl-15">// pinnedRows getter</span><br/><span class="hl-4">moveRow</span><span class="hl-1">(</span><span class="hl-2">from</span><span class="hl-1">, </span><span class="hl-2">to</span><span class="hl-1">, </span><span class="hl-3">'before'</span><span class="hl-1"> | </span><span class="hl-3">'after'</span><span class="hl-1">)</span><br/><br/><span class="hl-4">undo</span><span class="hl-1">(); </span><span class="hl-4">redo</span><span class="hl-1">(); </span><span class="hl-4">clearHistory</span><span class="hl-1">() </span><span class="hl-15">// canUndo / canRedo getters</span><br/><br/><span class="hl-4">localize</span><span class="hl-1">(</span><span class="hl-2">key</span><span class="hl-1">, </span><span class="hl-2">params</span><span class="hl-1">?, </span><span class="hl-2">fallback</span><span class="hl-1">?): </span><span class="hl-2">string</span><span class="hl-1"> </span><span class="hl-15">// resolve a locale string</span><br/><br/><span class="hl-4">exportToCSV</span><span class="hl-1">(</span><span class="hl-2">options</span><span class="hl-1">?): </span><span class="hl-2">string</span><br/><span class="hl-4">exportAs</span><span class="hl-1">(</span><span class="hl-2">formatId</span><span class="hl-1">, </span><span class="hl-2">options</span><span class="hl-1">?): </span><span class="hl-5">void</span><span class="hl-1"> </span><span class="hl-15">// toolbar dispatch; 'csv' (community), 'xlsx' (enterprise)</span><br/><br/><span class="hl-4">getState</span><span class="hl-1">(</span><span class="hl-2">options</span><span class="hl-1">?): </span><span class="hl-2">GridState</span><br/><span class="hl-4">setState</span><span class="hl-1">(</span><span class="hl-2">state</span><span class="hl-1">, </span><span class="hl-2">options</span><span class="hl-1">?): </span><span class="hl-2">SetStateResult</span><span class="hl-1"> </span><span class="hl-15">// partial + defensive; never throws unless { strict: true }</span><br/><span class="hl-4">getSchema</span><span class="hl-1">(): </span><span class="hl-2">GridSchema</span><span class="hl-1"> </span><span class="hl-15">// machine-readable capability descriptor</span>
|
|
403
508
|
</code><button type="button">Copy</button></pre>
|
|
404
509
|
|
|
405
510
|
<h3 id="events" class="tsd-anchor-link">Events<a href="#events" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
@@ -449,16 +554,36 @@
|
|
|
449
554
|
<td><code>{ row, column, value, newValue }</code></td>
|
|
450
555
|
</tr>
|
|
451
556
|
<tr>
|
|
557
|
+
<td><code>cellValidationFailed</code></td>
|
|
558
|
+
<td>no</td>
|
|
559
|
+
<td><code>{ key, rowIndex, data, value, errors }</code></td>
|
|
560
|
+
</tr>
|
|
561
|
+
<tr>
|
|
452
562
|
<td><code>rowEditStarted</code> / <code>rowEditEnded</code></td>
|
|
453
563
|
<td>no / no</td>
|
|
454
564
|
<td>row context</td>
|
|
455
565
|
</tr>
|
|
456
566
|
<tr>
|
|
567
|
+
<td><code>historyChanged</code></td>
|
|
568
|
+
<td>no</td>
|
|
569
|
+
<td><code>{ canUndo, canRedo }</code></td>
|
|
570
|
+
</tr>
|
|
571
|
+
<tr>
|
|
457
572
|
<td><code>rowSelecting</code> / <code>rowSelected</code></td>
|
|
458
573
|
<td>yes / no</td>
|
|
459
574
|
<td><code>{ added, removed }</code></td>
|
|
460
575
|
</tr>
|
|
461
576
|
<tr>
|
|
577
|
+
<td><code>rowPinning</code> / <code>rowPinned</code></td>
|
|
578
|
+
<td>yes / no</td>
|
|
579
|
+
<td><code>{ row, position }</code></td>
|
|
580
|
+
</tr>
|
|
581
|
+
<tr>
|
|
582
|
+
<td><code>rowMoving</code> / <code>rowMoved</code></td>
|
|
583
|
+
<td>yes / no</td>
|
|
584
|
+
<td><code>{ from, to, data }</code></td>
|
|
585
|
+
</tr>
|
|
586
|
+
<tr>
|
|
462
587
|
<td><code>rowExpanding</code> / <code>rowExpanded</code></td>
|
|
463
588
|
<td>yes / no</td>
|
|
464
589
|
<td>row context</td>
|
|
@@ -468,11 +593,16 @@
|
|
|
468
593
|
<td>yes / no</td>
|
|
469
594
|
<td>row context</td>
|
|
470
595
|
</tr>
|
|
596
|
+
<tr>
|
|
597
|
+
<td><code>stateChanged</code></td>
|
|
598
|
+
<td>no</td>
|
|
599
|
+
<td><code>{ state }</code> (debounced; only while listened)</td>
|
|
600
|
+
</tr>
|
|
471
601
|
</tbody>
|
|
472
602
|
</table>
|
|
473
|
-
<p>Programmatic <code>sort()</code> / <code>filter()</code> calls are silent
|
|
603
|
+
<p>Programmatic <code>sort()</code> / <code>filter()</code> calls are silent; only UI-initiated changes emit <code>sorting</code> / <code>filtering</code>.</p>
|
|
474
604
|
<h3 id="attributes" class="tsd-anchor-link">Attributes<a href="#attributes" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
475
|
-
<p><code>auto-generate</code>, <code>quick-filter</code>, <code>show-quick-filter</code>, <code>show-export</code>, <code>column-reordering</code>.</p>
|
|
605
|
+
<p><code>auto-generate</code>, <code>quick-filter</code>, <code>show-quick-filter</code>, <code>show-export</code>, <code>column-reordering</code>, <code>coordinate-hints</code>.</p>
|
|
476
606
|
<h3 id="css-parts" class="tsd-anchor-link">CSS parts<a href="#css-parts" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
|
|
477
607
|
<table>
|
|
478
608
|
<thead>
|
|
@@ -537,12 +667,12 @@
|
|
|
537
667
|
<h2 id="releasing" class="tsd-anchor-link">Releasing<a href="#releasing" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
538
668
|
<p>Releases are automated by <a href=".github/workflows/publish.yml">.github/workflows/publish.yml</a>:</p>
|
|
539
669
|
<ol>
|
|
540
|
-
<li>Bump <code>"version"</code> in <a href="media/package.json">package.json</a
|
|
670
|
+
<li>Bump <code>"version"</code> in <a href="media/package.json">package.json</a>, the single source of truth. The build injects it into <code>dist/package.json</code>.</li>
|
|
541
671
|
<li>Commit with a message starting with <code>release:</code> and the same version, e.g. <code>release: 2.0.0</code> or <code>release: 2.0.0-rc.1</code>.</li>
|
|
542
672
|
<li>Push to <code>main</code>.</li>
|
|
543
673
|
</ol>
|
|
544
|
-
<p>The workflow then verifies the version triple-match, runs lint + tests + build, publishes <code>dist/</code> to npm with <code>--provenance</code> (OIDC trusted publishing
|
|
674
|
+
<p>The workflow then verifies the version triple-match, runs lint + tests + build, publishes <code>dist/</code> to npm with <code>--provenance</code> (OIDC trusted publishing, no token in secrets), and creates a <code>vX.Y.Z</code> git tag and GitHub Release with auto-generated notes. Pre-release versions (containing <code>-</code>) publish under the <code>next</code> dist-tag; stable versions under <code>latest</code>.</p>
|
|
545
675
|
<p>Any push whose head commit does not start with <code>release:</code> is a no-op for the workflow.</p>
|
|
546
676
|
<h2 id="license" class="tsd-anchor-link">License<a href="#license" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
547
677
|
<p>See <a href="media/LICENSE">LICENSE</a>.</p>
|
|
548
|
-
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#apex-grid"><span>Apex <wbr/>Grid</span></a><ul><li><a href="#features"><span>Features</span></a></li><li><a href="#quick-start"><span>Quick <wbr/>Start</span></a></li><li><ul><li><a href="#one-call-setup"><span>One-<wbr/>call setup</span></a></li><li><a href="#render-the-grid"><span>Render the grid</span></a></li></ul></li><li><a href="#manual-setup-four-steps"><span>Manual setup (four steps)</span></a></li><li><ul><li><a href="#1-install"><span>1. <wbr/>Install</span></a></li><li><a href="#2-register-the-custom-element"><span>2. <wbr/>Register the custom element</span></a></li><li><a href="#3-optional-customize-the-look"><span>3. (<wbr/>Optional) <wbr/>Customize the look</span></a></li><li><a href="#4-size-the-host"><span>4. <wbr/>Size the host</span></a></li><li><a href="#what-success-looks-like"><span>What success looks like</span></a></li><li><a href="#troubleshooting"><span>Troubleshooting</span></a></li></ul></li><li><a href="#features-in-depth"><span>Features in depth</span></a></li><li><ul><li><a href="#sorting"><span>Sorting</span></a></li><li><a href="#filtering"><span>Filtering</span></a></li><li><a href="#quick-filter-global-search"><span>Quick filter (global search)</span></a></li><li><a href="#pagination"><span>Pagination</span></a></li><li><a href="#column-pinning"><span>Column pinning</span></a></li><li><a href="#column-reordering"><span>Column reordering</span></a></li><li><a href="#inline-editing"><span>Inline editing</span></a></li><li><a href="#row-selection"><span>Row selection</span></a></li><li><a href="#row-expansion-master-detail"><span>Row expansion (master-<wbr/>detail)</span></a></li><li><a href="#tree-data-nested-rows"><span>Tree data (nested rows)</span></a></li><li><a href="#csv-export"><span>CSV export</span></a></li><li><a href="#toolbar"><span>Toolbar</span></a></li><li><a href="#theming"><span>Theming</span></a></li></ul></li><li><a href="#api-reference"><span>API <wbr/>Reference</span></a></li><li><ul><li><a href="#properties"><span>Properties</span></a></li><li><a href="#methods"><span>Methods</span></a></li><li><a href="#events"><span>Events</span></a></li><li><a href="#attributes"><span>Attributes</span></a></li><li><a href="#css-parts"><span>CSS parts</span></a></li></ul></li><li><a href="#framework-integration"><span>Framework integration</span></a></li><li><a href="#local-development"><span>Local development</span></a></li><li><a href="#releasing"><span>Releasing</span></a></li><li><a href="#license"><span>License</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="modules.html">apex-grid</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
678
|
+
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#apex-grid"><span>Apex <wbr/>Grid</span></a><ul><li><a href="#features"><span>Features</span></a></li><li><a href="#quick-start"><span>Quick <wbr/>Start</span></a></li><li><ul><li><a href="#one-call-setup"><span>One-<wbr/>call setup</span></a></li><li><a href="#render-the-grid"><span>Render the grid</span></a></li></ul></li><li><a href="#manual-setup-four-steps"><span>Manual setup (four steps)</span></a></li><li><ul><li><a href="#1-install"><span>1. <wbr/>Install</span></a></li><li><a href="#2-register-the-custom-element"><span>2. <wbr/>Register the custom element</span></a></li><li><a href="#3-optional-customize-the-look"><span>3. (<wbr/>Optional) <wbr/>Customize the look</span></a></li><li><a href="#4-size-the-host"><span>4. <wbr/>Size the host</span></a></li><li><a href="#what-success-looks-like"><span>What success looks like</span></a></li><li><a href="#troubleshooting"><span>Troubleshooting</span></a></li></ul></li><li><a href="#features-in-depth"><span>Features in depth</span></a></li><li><ul><li><a href="#sorting"><span>Sorting</span></a></li><li><a href="#filtering"><span>Filtering</span></a></li><li><a href="#quick-filter-global-search"><span>Quick filter (global search)</span></a></li><li><a href="#pagination"><span>Pagination</span></a></li><li><a href="#column-pinning"><span>Column pinning</span></a></li><li><a href="#column-reordering"><span>Column reordering</span></a></li><li><a href="#column-separators"><span>Column separators</span></a></li><li><a href="#column-groups-spanning-headers"><span>Column groups (spanning headers)</span></a></li><li><a href="#inline-editing"><span>Inline editing</span></a></li><li><a href="#cell-validation"><span>Cell validation</span></a></li><li><a href="#undo-redo"><span>Undo / redo</span></a></li><li><a href="#row-selection"><span>Row selection</span></a></li><li><a href="#row-pinning-top-bottom"><span>Row pinning (top / bottom)</span></a></li><li><a href="#row-drag-reorder"><span>Row drag-<wbr/>reorder</span></a></li><li><a href="#row-expansion-master-detail"><span>Row expansion (master-<wbr/>detail)</span></a></li><li><a href="#tree-data-nested-rows"><span>Tree data (nested rows)</span></a></li><li><a href="#csv-export"><span>CSV export</span></a></li><li><a href="#toolbar"><span>Toolbar</span></a></li><li><a href="#theming"><span>Theming</span></a></li><li><a href="#spreadsheet-coordinates"><span>Spreadsheet coordinates</span></a></li><li><a href="#state-persistence"><span>State & persistence</span></a></li></ul></li><li><a href="#api-reference"><span>API <wbr/>Reference</span></a></li><li><ul><li><a href="#properties"><span>Properties</span></a></li><li><a href="#methods"><span>Methods</span></a></li><li><a href="#events"><span>Events</span></a></li><li><a href="#attributes"><span>Attributes</span></a></li><li><a href="#css-parts"><span>CSS parts</span></a></li></ul></li><li><a href="#framework-integration"><span>Framework integration</span></a></li><li><a href="#local-development"><span>Local development</span></a></li><li><a href="#releasing"><span>Releasing</span></a></li><li><a href="#license"><span>License</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="modules.html">apex-grid</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|