react-gridix 0.2.5 → 0.2.6
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 +32 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -128,7 +128,7 @@ import logo from "./logo.png";
|
|
|
128
128
|
``
|
|
129
129
|
|
|
130
130
|
Without `libraries`, or if an import fails, a PDF export reports an error that says what to install (see `onExportError`) and everything else keeps working.
|
|
131
|
-
|
|
131
|
+
```
|
|
132
132
|
---
|
|
133
133
|
|
|
134
134
|
## 3. Quick start
|
|
@@ -534,6 +534,36 @@ const columns: ColumnDef<Employee>[] = [
|
|
|
534
534
|
{ field: "hired", headerName: "Hired", type: "date", sortable: true, filterable: true },
|
|
535
535
|
];
|
|
536
536
|
```
|
|
537
|
+
```tsx
|
|
538
|
+
const columns: ColumnDef<User>[] = [
|
|
539
|
+
// all eight comparisons
|
|
540
|
+
{ field: "name", headerName: "Name", filterable: true, filterOperators: true },
|
|
541
|
+
|
|
542
|
+
// only some of them, with a different one selected first
|
|
543
|
+
{
|
|
544
|
+
field: "email",
|
|
545
|
+
headerName: "Email",
|
|
546
|
+
filterable: true,
|
|
547
|
+
filterOperators: ["contains", "startsWith", "endsWith", "equals"],
|
|
548
|
+
filterOperator: "startsWith",
|
|
549
|
+
},
|
|
550
|
+
|
|
551
|
+
// no filterOperators: a plain box that always means "contains"
|
|
552
|
+
{ field: "city", headerName: "City", filterable: true },
|
|
553
|
+
];
|
|
554
|
+
```
|
|
555
|
+
##### summary
|
|
556
|
+
| Value | Label shown |
|
|
557
|
+
| --- | --- |
|
|
558
|
+
| `"contains"` | Contains |
|
|
559
|
+
| `"notContains"` | Does not contain |
|
|
560
|
+
| `"equals"` | Equals |
|
|
561
|
+
| `"notEquals"` | Not equal |
|
|
562
|
+
| `"startsWith"` | Starts with |
|
|
563
|
+
| `"notStartsWith"` | Does not start with |
|
|
564
|
+
| `"endsWith"` | Ends with |
|
|
565
|
+
| `"notEndsWith"` | Does not end with |
|
|
566
|
+
|
|
537
567
|
|
|
538
568
|
| Option | Type | Description |
|
|
539
569
|
| --- | --- | --- |
|
|
@@ -579,6 +609,7 @@ const columns: ColumnDef<Employee>[] = [
|
|
|
579
609
|
| `checkbox` | `ColumnCheckboxOptions` | Look of the checkbox in a `type: "boolean"` column: `variant`, `indicator`, `className`, `style`, `classNames`, `styles` |
|
|
580
610
|
| `headerCheckbox` | `boolean` | On a `type: "boolean"` column, draws a select-all checkbox in the header. See [Select-all header checkbox](#select-all-header-checkbox) |
|
|
581
611
|
|
|
612
|
+
|
|
582
613
|
#### Row numbers (sequence column)
|
|
583
614
|
|
|
584
615
|
`type: "sequence"` adds a column of row numbers. It needs no data in your rows: give it a `field` that starts with `#` (so it can never clash with a real field) and a header.
|