Files
lightController/src/components/dbm/dataTable.vue
Adrian Zürcher 3e2b95c1c3 update dbmData and Subscription so it is reactive
new save load scenes
2025-06-19 19:30:28 +02:00

40 lines
815 B
Vue

<template>
<div class="q-pa-md">
<q-table
v-if="tableRows.length > 0"
style="height: 600px"
flat
bordered
:title="props.rows[0]?.path"
:rows="rows"
:columns="columns"
row-key="path"
virtual-scroll
:rows-per-page-options="[0]"
/>
</div>
</template>
<script setup lang="ts">
import type { QTableProps } from 'quasar';
import type { Subs } from 'src/models/Subscribe';
import { computed } from 'vue';
// we generate lots of rows here
const props = defineProps<{
rows: Subs;
}>();
const tableRows = computed(() => [...props.rows]);
const columns = [
{ name: 'path', label: 'Path', field: 'path', align: 'left' },
{
name: 'value',
label: 'Value',
field: 'value',
align: 'left',
},
] as QTableProps['columns'];
</script>