@polymarbot/nuxt-layer-shadcn-ui 0.3.3 → 0.3.5
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.
|
@@ -29,7 +29,7 @@ const props = withDefaults(defineProps<AsyncDataTableProps<TData>>(), {
|
|
|
29
29
|
const emit = defineEmits<{
|
|
30
30
|
'update:filters': [filters: Record<string, any>]
|
|
31
31
|
'update:selection': [value: TData[]]
|
|
32
|
-
'rowClick': [row: TData, event: MouseEvent]
|
|
32
|
+
'rowClick': [row: TData, index: number, event: MouseEvent]
|
|
33
33
|
}>()
|
|
34
34
|
|
|
35
35
|
const T = useTranslations('components.ui.AsyncDataTable')
|
|
@@ -264,7 +264,7 @@ onMounted(() => {
|
|
|
264
264
|
@update:selection="onSelectionChange"
|
|
265
265
|
@update:sortBy="onSortByUpdate"
|
|
266
266
|
@update:sortOrder="onSortOrderUpdate"
|
|
267
|
-
@rowClick="(row: TData, event: MouseEvent) => emit('rowClick', row, event)"
|
|
267
|
+
@rowClick="(row: TData, index: number, event: MouseEvent) => emit('rowClick', row, index, event)"
|
|
268
268
|
>
|
|
269
269
|
<template
|
|
270
270
|
v-for="name in Object.keys($slots).filter(n => n !== 'toolbar')"
|
|
@@ -31,7 +31,7 @@ const props = withDefaults(defineProps<DataTableProps<TData>>(), {
|
|
|
31
31
|
const emit = defineEmits<{
|
|
32
32
|
'update:sortBy': [value: string | null]
|
|
33
33
|
'update:sortOrder': [value: number | null]
|
|
34
|
-
'rowClick': [row: TData, event: MouseEvent]
|
|
34
|
+
'rowClick': [row: TData, index: number, event: MouseEvent]
|
|
35
35
|
}>()
|
|
36
36
|
|
|
37
37
|
const selection = defineModel<TData | TData[] | null>('selection', { default: null })
|
|
@@ -93,8 +93,8 @@ function toggleRow (row: TData) {
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
function onRowClick (row: TData, event: MouseEvent) {
|
|
97
|
-
emit('rowClick', row, event)
|
|
96
|
+
function onRowClick (row: TData, index: number, event: MouseEvent) {
|
|
97
|
+
emit('rowClick', row, index, event)
|
|
98
98
|
if (showSelectionColumn.value) toggleRow(row)
|
|
99
99
|
}
|
|
100
100
|
|
|
@@ -358,7 +358,7 @@ const selectionColumnShadowDir = computed<FrozenShadow | undefined>(() =>
|
|
|
358
358
|
:key="index"
|
|
359
359
|
:class="(showSelectionColumn || clickable) && 'cursor-pointer'"
|
|
360
360
|
:data-state="isRowSelected(row) ? 'selected' : undefined"
|
|
361
|
-
@click="onRowClick(row, $event)"
|
|
361
|
+
@click="onRowClick(row, index, $event)"
|
|
362
362
|
>
|
|
363
363
|
<!-- Selection cell: stop click to prevent double toggle with row click -->
|
|
364
364
|
<TableCell
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polymarbot/nuxt-layer-shadcn-ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "Nuxt layer providing shadcn-vue based UI components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./nuxt.config.ts",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"vue-i18n": "^11",
|
|
43
43
|
"vue-router": "^4 || ^5"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "444c57a6e8f2aa5d82eda42f687546c2154e0603"
|
|
46
46
|
}
|