@innertia-solutions/nuxt-theme-spark 0.1.67 → 0.1.68
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.
|
@@ -221,6 +221,7 @@ defineExpose({ getSelectedRows, reload, clearCache, exportTable, tableRef })
|
|
|
221
221
|
:show-reload-button="showReloadButton"
|
|
222
222
|
:click-row-to-open="clickRowToOpen"
|
|
223
223
|
:preview-row-id="previewRow?.id ?? null"
|
|
224
|
+
:preview-mode="!!$slots.preview"
|
|
224
225
|
@row-click="handleRowClick"
|
|
225
226
|
@loaded="emit('loaded', $event)"
|
|
226
227
|
>
|
package/components/Table.vue
CHANGED
|
@@ -21,6 +21,7 @@ const props = defineProps({
|
|
|
21
21
|
gridClass: { type: String, default: 'grid grid-cols-2 lg:grid-cols-3 gap-4' },
|
|
22
22
|
clickRowToOpen: { type: Boolean, default: false },
|
|
23
23
|
previewRowId: { type: [String, Number], default: null },
|
|
24
|
+
previewMode: { type: Boolean, default: false },
|
|
24
25
|
})
|
|
25
26
|
|
|
26
27
|
const emit = defineEmits(['update:search', 'row-click', 'loaded'])
|
|
@@ -420,7 +421,7 @@ const resetPerPage = () => {
|
|
|
420
421
|
|
|
421
422
|
// ─── Row click ────────────────────────────────────────────────────────────────
|
|
422
423
|
const hasRowClickListener = computed(() => !!instance?.vnode?.props?.onRowClick)
|
|
423
|
-
const isRowClickEnabled = computed(() => props.clickRowToOpen || hasRowClickListener.value)
|
|
424
|
+
const isRowClickEnabled = computed(() => props.clickRowToOpen || props.previewMode || hasRowClickListener.value)
|
|
424
425
|
|
|
425
426
|
const interactiveSelector = [
|
|
426
427
|
'a', 'button', 'input', 'select', 'textarea', 'label', 'summary',
|