Skip to content

Commit 8526e01

Browse files
github-actions[bot]GitHub CopilotCopilot
authored
docs: update DataTable FilterConfig and AppShell rootComponent docs (#231)
- Add FilterConfig section to data-table.md documenting available filter types and their supported operators, including the new 'between' range operator for number/datetime/date/time columns - Update rootComponent section in app-shell.md to document that the root page now appears in DefaultSidebar and CommandPalette as a first-class navigation item with 'Home'/'ホーム' as the default title Co-authored-by: GitHub Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent a3d0170 commit 8526e01

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

docs/components/app-shell.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ const modules = [
118118
</AppShell>
119119
```
120120

121+
When `rootComponent` is set, the root page is treated as a first-class navigation item: it appears in `DefaultSidebar` and `CommandPalette` just like any other module. The title defaults to the localized `"Home"` / `"ホーム"` if no explicit title is provided.
122+
121123
> **Tip:** For redirects from the root, use a guard with `redirectTo()` instead
122124
123125
```tsx
@@ -128,6 +130,8 @@ import { redirectTo } from "@tailor-platform/app-shell";
128130
</AppShell>;
129131
```
130132

133+
> **Note:** If a module with `path: ""` is present in `modules`, it takes precedence over `rootComponent`.
134+
131135
### settingsResources
132136

133137
- **Type:** `Resource[]` (optional)

docs/components/data-table.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,31 @@ A column definition passed to `useDataTable`.
225225
| `sort` | `SortConfig` | Sort configuration. When set, the column header becomes clickable (Asc → Desc → off). |
226226
| `filter` | `FilterConfig` | Filter configuration. When set, the column appears as an option in `DataTable.Filters`. |
227227

228+
## `FilterConfig`
229+
230+
The `filter` property on a column accepts a `FilterConfig` object. When set, the column appears as an option in `DataTable.Filters` and the filter chip renders an input editor appropriate for the type.
231+
232+
| Property | Type | Description |
233+
| --------- | ---------------- | ---------------------------------------------------------------------------- |
234+
| `field` | `string` | API field name used in the generated query input. |
235+
| `type` | `FilterType` | Filter editor type (see table below). |
236+
| `options` | `SelectOption[]` | Required when `type` is `"enum"`. List of selectable values. |
237+
238+
### Filter Types and Operators
239+
240+
| Type | Input editor | Supported operators |
241+
| ---------- | -------------------- | -------------------------------------------------------------------------------------------------------------- |
242+
| `string` | Text | `eq`, `ne`, `contains`, `notContains`, `hasPrefix`, `hasSuffix`, `notHasPrefix`, `notHasSuffix`, `in`, `nin` |
243+
| `number` | Number | `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, **`between`**, `in`, `nin` |
244+
| `datetime` | Datetime-local | `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, **`between`**, `in`, `nin` |
245+
| `date` | Date | `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, **`between`**, `in`, `nin` |
246+
| `time` | Time | `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, **`between`**, `in`, `nin` |
247+
| `enum` | Dropdown | `eq`, `ne`, `in`, `nin` |
248+
| `boolean` | Toggle | `eq`, `ne` |
249+
| `uuid` | Text | `eq`, `ne`, `in`, `nin` |
250+
251+
When the user selects the `between` operator on a `number`, `datetime`, `date`, or `time` column, the filter chip renders a range input with **min** and **max** bounds.
252+
228253
## `RowAction`
229254

230255
| Property | Type | Description |

0 commit comments

Comments
 (0)