@hostlink/nuxt-light 1.10.16 → 1.10.17

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.
package/dist/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "light",
3
3
  "configKey": "light",
4
- "version": "1.10.16"
4
+ "version": "1.10.17"
5
5
  }
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import { useQuasar, QTable, type QTableColumn, type QTableProps } from 'quasar';
3
3
 
4
- import { ref, computed, onMounted, useSlots, useAttrs, watch } from "vue";
4
+ import { ref, computed, onMounted, useSlots, useAttrs, watch, defineComponent, h } from "vue";
5
5
  import { t, q, useLight, GQLFieldBuilder, model } from '../';
6
6
  import { toQuery } from '@hostlink/light';
7
7
 
@@ -57,6 +57,9 @@ const props = withDefaults(defineProps<LTableProps>(), {
57
57
  noDataLabel: "No data available",
58
58
  });
59
59
 
60
+ const isServerSide = (props.rows == undefined);
61
+
62
+
60
63
  const light = useLight();
61
64
 
62
65
  const pagination = ref(props.pagination);
@@ -147,18 +150,12 @@ const table = ref<InstanceType<typeof QTable>>();
147
150
 
148
151
  const filters = ref<InstanceType<any>>({});
149
152
  const rows = ref<InstanceType<any>>(props.rows);
153
+ if (rows.value == undefined) {
154
+ rows.value = [];
155
+ }
150
156
 
151
157
  onMounted(() => {
152
- if (table.value) {
153
- table.value.requestServerInteraction();
154
- }
155
-
156
- })
157
-
158
-
159
-
160
- const isServerSide = computed(() => {
161
- return props.rows == undefined;
158
+ table.value && table.value.requestServerInteraction();
162
159
  })
163
160
 
164
161
  let primaryKey = ref(props.rowKey);
@@ -246,7 +243,7 @@ const getData = async (
246
243
  }
247
244
 
248
245
  const onRequest = async (p: any) => {
249
- if (!isServerSide.value) return;
246
+ if (!isServerSide) return;
250
247
 
251
248
 
252
249
  let sort = "";
@@ -517,6 +514,13 @@ const localSelected = computed({
517
514
  watch(() => props.rows, (val) => {
518
515
  rows.value = val;
519
516
  });
517
+
518
+ const computedColumns = computed(() => {
519
+ return props.columns;
520
+ })
521
+
522
+
523
+
520
524
  </script>
521
525
 
522
526
 
@@ -547,6 +551,8 @@ watch(() => props.rows, (val) => {
547
551
  </q-tr>
548
552
  </template>
549
553
 
554
+
555
+
550
556
  <template #body="props">
551
557
  <q-tr :props="props">
552
558
  <q-td v-if="selection != 'none'" auto-width>
@@ -575,6 +581,8 @@ watch(() => props.rows, (val) => {
575
581
 
576
582
  </q-td>
577
583
 
584
+
585
+
578
586
  <template v-for="col in props.cols">
579
587
  <template v-if="ss.indexOf('body-cell-' + col.name) >= 0">
580
588
  <slot :name="'body-cell-' + col.name" v-bind="props"></slot>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostlink/nuxt-light",
3
- "version": "1.10.16",
3
+ "version": "1.10.17",
4
4
  "description": "HostLink Nuxt Light Framework",
5
5
  "repository": "@hostlink/nuxt-light",
6
6
  "license": "MIT",