🌐 AI搜索 & 代理 主页
Skip to content

Commit efcdba6

Browse files
authored
docs(table): add details on the tbody-tr-class callback arguments (#4194)
1 parent 0e1f871 commit efcdba6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/components/table/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,14 @@ You can also style every row using the `tbody-tr-class` prop
454454
| -------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
455455
| `tbodyTrClass` | String, Array or Function | Classes to be applied to every row on the table. If a function is given, it will be called as `tbodyTrClass( item, type )` and it may return an `Array`, `Object` or `String`. |
456456

457+
When passing a function reference to `tbody-tr-class`, the function's arguments will be as follows:
458+
459+
- `item` - The item record data associated with the row. For rows that are not associated with an
460+
item record, this value will be `null` or `undefined`
461+
- `type` - The type of row being rendered. `'row'` for an item row, `'row-details'` for an item
462+
details row, `'row-top'` for the fixed row top slot, `'row-bottom'` for the fixed row bottom slot,
463+
or `'table-busy'` for the table busy slot.
464+
457465
**Example: Basic row styles**
458466

459467
```html

0 commit comments

Comments
 (0)