@akshar-technosoft/ui 1.1.4 → 1.2.1
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/README.md +13 -3
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +33 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -70,13 +70,22 @@ Extras on `GroupColumnDef`:
|
|
|
70
70
|
- `headerAlign: 'left' | 'center' | 'right'` — header alignment (body cell alignment is your `cell`'s business).
|
|
71
71
|
- `columns: [...]` — nested columns under a grouped header row.
|
|
72
72
|
- `enablePinning: false` — remove this column from the pin menu.
|
|
73
|
+
- `enableColumnVisibility: false` — per-column override for `settings.enableColumnVisibility`; keeps this one column out of the Columns menu and the header `⋯` menu's Hide entry, table-wide toggling stays on for the rest. Same field as TanStack's native `enableHiding` — set either, not both.
|
|
74
|
+
- `enableHeaderMenu: false` — hide the header's `⋯` options menu on this column entirely, regardless of what sorting/pinning/hiding would otherwise show. For a column that shouldn't offer the menu at all (an actions column, say) instead of disabling sorting and pinning separately just to make the dots go away.
|
|
75
|
+
- `reserveMenuSpace: true` — reserve real space for the sort chevron / `⋯` menu instead of letting them float as a hover-only overlay. Opt in only for a column with a custom interactive `header` (your own button) that the overlay would otherwise sit on top of — everywhere else hover reserves nothing on purpose (no layout shift).
|
|
73
76
|
- `customFooter: { content, align, className }` — a custom footer cell; `content` may be `(table) => ReactNode`. Beats the column's aggregation display.
|
|
74
77
|
- `exportValue` / `exportHeader` — see [Export](#export).
|
|
75
78
|
- `size` — fixed width in px; without it the column auto-sizes. Columns/Aggregations menus derive display names from the column id (`Party_Name` → "Party Name").
|
|
76
79
|
|
|
77
80
|
## Sorting
|
|
78
81
|
|
|
79
|
-
On by default (`enableSorting
|
|
82
|
+
On by default (`settings.enableSorting`, table-wide). Clicking a sortable header cycles asc → desc → clear; the header's `⋯` menu offers Sort Ascending / Sort Descending / Clear Sort explicitly (the active one disabled). The active direction shows as an arrow at the header's right edge; the `⋯` button and a faint sort hint appear on hover in a gradient overlay (no space is reserved, no text shifts). Clicks on interactive elements inside custom JSX headers do not sort.
|
|
83
|
+
|
|
84
|
+
Two levels, both named `enableSorting`, and they AND together — table-level can't be overridden back on per-column:
|
|
85
|
+
- `settings.enableSorting: false` (table-level) kills sorting everywhere — no column can re-enable itself with `enableSorting: true`.
|
|
86
|
+
- A column's own `enableSorting: false` turns sorting off for just that column, table-wide sorting stays on for the rest. This is the normal way to make specific columns unsortable — leave `settings.enableSorting` alone (default on) and opt individual columns out, not the other way around.
|
|
87
|
+
|
|
88
|
+
The serial "No." column sorts by display index — rarely meaningful.
|
|
80
89
|
|
|
81
90
|
## Filters — the full story
|
|
82
91
|
|
|
@@ -223,7 +232,8 @@ The toolbar's **Aggregations menu** (user-facing toggles, per-column function su
|
|
|
223
232
|
## Pinning, visibility, resizing
|
|
224
233
|
|
|
225
234
|
- **Pinning** (`enableColumnPinning`, default on): per-column via the header `⋯` menu (Pin Right / Unpin), bulk reset in the Settings menu. Serial and select columns are always pinned left and re-asserted on every change. A pinned column is clamped to its live rendered width so sticky offsets stay true.
|
|
226
|
-
- **Visibility** (`enableColumnVisibility`, default on): the toolbar Columns menu toggles columns (grouped columns listed under their group); the header `⋯` menu offers Hide. Un-hiding lives only in the Columns menu — a hidden column has no header to click. `
|
|
235
|
+
- **Visibility** (`settings.enableColumnVisibility`, default on): the toolbar Columns menu toggles columns (grouped columns listed under their group); the header `⋯` menu offers Hide. Un-hiding lives only in the Columns menu — a hidden column has no header to click. Per-column `enableColumnVisibility: false` (or TanStack's native `enableHiding: false`, same thing) keeps that one column out of all of it.
|
|
236
|
+
- **Header menu** (`⋯`): appears whenever a column can sort, pin, or hide — whichever of those is on drives it, nothing to configure directly. `enableHeaderMenu: false` on a column suppresses the `⋯` unconditionally, even if sort/pin/hide are on; the sort chevron and click-to-sort are unaffected (that's `enableSorting`'s call, not the menu's).
|
|
227
237
|
- **Resizing** (`enableColumnResizing`, default OFF): live drag handles on header right edges. Pinned columns are size-locked — resize first, pin after.
|
|
228
238
|
|
|
229
239
|
## Persist
|
|
@@ -406,7 +416,7 @@ Every prop `DataTable` accepts — this is the whole surface, nothing else exist
|
|
|
406
416
|
| `shared` | no | Group-wide value slot (needs `persist.group`) |
|
|
407
417
|
| `persist` | no (`true`) | `false` = exclude from persistence |
|
|
408
418
|
|
|
409
|
-
`GroupColumnDef` extras beyond TanStack: `headerAlign`, `columns`, `enablePinning`, `customFooter`, `exportValue`, `exportHeader` ([Columns](#columns)). `PersistConfig`: `key` (required), `group`, `local`, `pagination` ([Persist](#persist)). `AggregationConfig`: `enabled`, `functions`, `format`, `accessor` ([Aggregations](#aggregations)). `PaginationConfig`: `pageSize`, `pageSizeOptions`, `showInfo`, `showPageNumbers` ([Pagination](#pagination)).
|
|
419
|
+
`GroupColumnDef` extras beyond TanStack: `headerAlign`, `columns`, `enablePinning`, `enableColumnVisibility`, `enableHeaderMenu`, `reserveMenuSpace`, `customFooter`, `exportValue`, `exportHeader` ([Columns](#columns)). `PersistConfig`: `key` (required), `group`, `local`, `pagination` ([Persist](#persist)). `AggregationConfig`: `enabled`, `functions`, `format`, `accessor` ([Aggregations](#aggregations)). `PaginationConfig`: `pageSize`, `pageSizeOptions`, `showInfo`, `showPageNumbers` ([Pagination](#pagination)).
|
|
410
420
|
|
|
411
421
|
Action bar: `DataTableActionBar` takes `table`, `visible` (default: auto — shown while anything selected), `container` (portal target, default `document.body`) plus `motion.div` props; `DataTableActionBarAction` takes Button props plus `tooltip` and `isPending`; `DataTableActionBarSelection` takes `table`.
|
|
412
422
|
|