You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/docs/pages/api-reference/props.mdx
+56Lines changed: 56 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,6 +72,7 @@ Some properties are only valid for columns or rows:
72
72
|----------|-----------|-------------|
73
73
|`width`| Columns only | Column width in pixels |
74
74
|`height`| Rows only | Row height in pixels |
75
+
|`label`| Columns only | Custom display text for the column header |
75
76
|`labeler`| Both | Custom labeler for headers |
76
77
77
78
**Note**: If you specify `width` or `height` on a cell address like `D3`, it will be ignored.
@@ -86,6 +87,7 @@ Each cell can be configured with the following properties:
86
87
|`style`|`CSSProperties`| CSS properties for appearance |
87
88
|`justifyContent`|`CSSProperties['justifyContent']`| Horizontal alignment within the cell |
88
89
|`alignItems`|`CSSProperties['alignItems']`| Vertical alignment within the cell |
90
+
|`label`|`string`| Custom display text for column headers (only valid on column specifications, e.g., `A`, `B`) |
89
91
|`labeler`|`string`| Key of a labeler registered in the hub |
90
92
|`width`|`Width`| Cell width in pixels |
91
93
|`height`|`Height`| Cell height in pixels |
@@ -100,6 +102,60 @@ Each cell can be configured with the following properties:
100
102
-**Serialization**: Cell values (except `system` field) are designed to be serializable. Avoid storing non-serializable objects like class instances.
101
103
-**System Field**: The `system` field contains values used by the system to display correct values. Do not modify this field manually.
102
104
105
+
### Prevention Flags
106
+
107
+
The `prevention` property uses bitwise flags from the `operations` export to restrict specific operations on cells, columns, or rows. Multiple flags can be combined with the `|` (OR) operator.
Sorts all data rows by the values in the specified column. Supports ascending and descending order. Null/undefined values are sorted to the end. This operation is recorded in the undo/redo history.
Applies a filter to the specified column. Rows that do not match the filter conditions are hidden. Multiple columns can have independent filters, and they are combined with AND logic across columns.
303
+
304
+
The `FilterConfig` object has the following structure:
305
+
306
+
```tsx
307
+
typeFilterConfig= {
308
+
mode:'and'|'or'; // How multiple conditions are combined
309
+
conditions:FilterCondition[];
310
+
};
311
+
312
+
typeFilterCondition= {
313
+
method:FilterConditionMethod; // e.g., 'eq', 'contains', 'gt', etc.
314
+
value:string[];
315
+
};
316
+
```
317
+
318
+
Available filter methods:
319
+
320
+
| Method | Description |
321
+
|--------|-------------|
322
+
|`eq`| Equals |
323
+
|`ne`| Not equals |
324
+
|`gt`| Greater than |
325
+
|`gte`| Greater than or equal |
326
+
|`lt`| Less than |
327
+
|`lte`| Less than or equal |
328
+
|`contains`| Contains substring |
329
+
|`notContains`| Does not contain substring |
330
+
|`empty`| Cell is empty (no value required) |
331
+
|`notEmpty`| Cell is not empty (no value required) |
332
+
333
+
```tsx
334
+
// Filter column B: show only rows where value > 80
335
+
const newTable =table.filterRows({
336
+
x: 2,
337
+
filter: {
338
+
mode: 'and',
339
+
conditions: [{ method: 'gt', value: ['80'] }],
340
+
},
341
+
});
342
+
sync(newTable);
343
+
```
344
+
345
+
#### `clearFilterRows(x?: number): UserTable`
346
+
Clears filter conditions. If `x` is provided, clears only the filter for that column. If omitted, clears all column filters.
347
+
348
+
```tsx
349
+
// Clear filter on column B only
350
+
const newTable =table.clearFilterRows(2);
351
+
sync(newTable);
352
+
353
+
// Clear all filters
354
+
const newTable =table.clearFilterRows();
355
+
sync(newTable);
356
+
```
357
+
358
+
#### `isRowFiltered(y: number): boolean`
359
+
Returns `true` if the specified row is currently hidden by a filter.
360
+
361
+
```tsx
362
+
if (table.isRowFiltered(3)) {
363
+
console.log('Row 3 is hidden by a filter');
364
+
}
365
+
```
366
+
367
+
#### `hasActiveFilters(): boolean`
368
+
Returns `true` if any column has an active filter.
Sets a custom display label for the specified column header. If an empty string is provided, the label is removed and the default column letter (A, B, C, ...) is displayed. This operation is recorded in the undo/redo history.
Copy file name to clipboardExpand all lines: packages/docs/pages/getting-started/features.mdx
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,6 +62,14 @@ Comprehensive event system for spreadsheet operations:
62
62
-**Initialization Events**: `onInit` for table initialization
63
63
-**Real-time Feedback**: Immediate event notifications for all operations
64
64
65
+
### Column Menu
66
+
67
+
Interactive column header menu accessible via the ⋮ button on each column:
68
+
-**Sort**: Sort rows ascending (A→Z) or descending (Z→A) by column values
69
+
-**Filter**: Show/hide rows based on conditions (equals, contains, greater than, etc.) with AND/OR logic and multiple conditions
70
+
-**Label Editing**: Rename column headers directly from the menu
71
+
-**Prevention Support**: Granular control over which operations are available per column using `operations.Sort`, `operations.Filter`, `operations.SetLabel`, `operations.SetLabeler`
72
+
65
73
## Performance Features
66
74
67
75
-**Virtual Scrolling**: Efficient rendering for large datasets
0 commit comments