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
Use the `contextmenu` listener on your Table to make the rows righ-clickable. The function will receive the original event as the first argument and the row as the second argument.
@@ -393,7 +416,6 @@ Controls whether multiple rows can be expanded simultaneously in the table.
393
416
<!-- Or simply -->
394
417
<UTable />
395
418
</template>
396
-
397
419
```
398
420
399
421
#### Disable Row Expansion
@@ -534,6 +556,82 @@ componentProps:
534
556
---
535
557
::
536
558
559
+
### `select-header`
560
+
This slot allows you to customize the checkbox appearance in the table header for selecting all rows at once while using feature [Selectable](#selectable).
This slot allows you to customize the checkbox appearance for each row in the table while using feature [Selectable](#selectable).
600
+
601
+
#### Usage
602
+
```vue
603
+
<template>
604
+
<UTable v-model="selectable">
605
+
<template #select-data="{ checked, change }">
606
+
<!-- Place your custom component here -->
607
+
</template>
608
+
</UTable>
609
+
</template>
610
+
```
611
+
612
+
#### Props
613
+
614
+
| Prop | Type | Description |
615
+
|------|------|-------------|
616
+
|`checked`|`Boolean`| Indicates if the current row is selected |
617
+
|`change`|`Function`| Function to handle selection state changes. Must receive a boolean value (true/false) |
618
+
619
+
#### Example
620
+
```vue
621
+
<template>
622
+
<UTable>
623
+
<!-- Row checkbox customization -->
624
+
<template #select-data="{ checked, change }">
625
+
<input
626
+
type="checkbox"
627
+
:checked="checked"
628
+
@change="e => change(e.target.checked)"
629
+
/>
630
+
</template>
631
+
</UTable>
632
+
</template>
633
+
```
634
+
537
635
### `expand-action`
538
636
539
637
The `#expand-action` slot allows you to customize the expansion control interface for expandable table rows. This feature provides a flexible way to implement custom expand/collapse functionality while maintaining access to essential row data and state.
0 commit comments