@@ -87,6 +87,7 @@ import XSkeleton from '../skeleton/Skeleton.vue'
87
87
import type { SkeletonShape } from ' ../skeleton/Skeleton.vue'
88
88
89
89
import XIcon from ' ../icon/Icon.vue'
90
+ import XCheckbox from ' ../checkbox/Checkbox.vue'
90
91
91
92
import { chevronDownIcon } from ' ../../common/icons'
92
93
@@ -278,14 +279,14 @@ const { styles, classes, className } = useTheme('Table', {}, props)
278
279
:class =" classes.table"
279
280
>
280
281
<x-table-head :sticky-header =" stickyHeader" >
281
- <x-table-header v-if =" props.selectable && !props.singleSelect" width =" 48 " class =" !px-3 ! py-2.5" >
282
+ <x-table-header v-if =" props.selectable && !props.singleSelect" width =" 40 " class =" !pl-3.5 !pr-0.5 ! py-2.5 cursor-pointer " @click = " toggleSelectAll " >
282
283
<x-checkbox
283
284
:model-value =" allRowsSelected || someRowsSelected"
284
285
:indeterminate =" someRowsSelected"
285
286
hide-footer
286
287
aria-label =" Select all rows"
287
288
skip-form-registry
288
- @click.prevent =" toggleSelectAll"
289
+ @click.prevent.stop =" toggleSelectAll"
289
290
/>
290
291
</x-table-header >
291
292
<x-table-header v-if =" expandable" width =" 48" class =" !p-0" />
@@ -354,13 +355,13 @@ const { styles, classes, className } = useTheme('Table', {}, props)
354
355
:single-select =" singleSelect"
355
356
@click =" onTableRowClick(item.data, item.index)"
356
357
>
357
- <x-table-cell v-if =" props.selectable && !singleSelect" width =" 48 " >
358
+ <x-table-cell v-if =" props.selectable && !singleSelect" width =" 40 " class = " !pl-3.5 !pr-0.5 cursor-pointer " @click.stop = " toggleRowSelection(keyProp ? (item.data as Record<string, unknown>)[keyProp] : item.index) " >
358
359
<x-checkbox
359
360
:model-value =" isRowSelected(keyProp ? (item.data as Record<string, unknown>)[keyProp] : item.index)"
360
361
hide-footer
361
362
:aria-label =" `Select row ${index + 1}`"
362
363
skip-form-registry
363
- @click.prevent =" toggleRowSelection(keyProp ? (item.data as Record<string, unknown>)[keyProp] : item.index)"
364
+ @click.prevent.stop =" toggleRowSelection(keyProp ? (item.data as Record<string, unknown>)[keyProp] : item.index)"
364
365
/>
365
366
</x-table-cell >
366
367
<x-table-cell v-if =" expandable" width =" 48" class =" !p-1" >
0 commit comments