@hostlink/nuxt-light 0.0.96 → 0.0.98

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": "0.0.96"
4
+ "version": "0.0.98"
5
5
  }
@@ -288,7 +288,10 @@ const onRequest = async (p: any) => {
288
288
 
289
289
  let localFilters = getFilterValue();
290
290
 
291
- //merge the filters
291
+ /* console.log("merge filters", filters)
292
+
293
+ console.log("local filters", getFilterValue())
294
+ */ //merge the filters
292
295
  if (filters) {
293
296
  localFilters = {
294
297
  ...localFilters,
@@ -296,15 +299,12 @@ const onRequest = async (p: any) => {
296
299
  }
297
300
  }
298
301
 
299
-
300
-
301
302
  let sort = "";
302
303
  if (p.pagination.sortBy) {
303
304
  sort = p.pagination.sortBy + ":" + (p.pagination.descending ? "desc" : "asc");
304
305
  }
305
306
 
306
307
 
307
-
308
308
  loading.value = true;
309
309
  const offset = (p.pagination.page - 1) * p.pagination.rowsPerPage;
310
310
  const limit = p.pagination.rowsPerPage;
@@ -339,7 +339,7 @@ const getFilterValue = () => {
339
339
 
340
340
  props.columns?.forEach((col) => {
341
341
  if (col.searchable) {
342
- if (filters.value[col.name]) {
342
+ if (filters.value[col.name] !== null && filters.value[col.name] !== "" && filters.value[col.name] !== undefined) {
343
343
 
344
344
  if (col.searchType == "number") {
345
345
  f[col.name] = filters.value[col.name]
@@ -351,12 +351,12 @@ const getFilterValue = () => {
351
351
  }
352
352
  } else if (col.searchType == "select") {
353
353
  f[col.name] = filters.value[col.name]
354
+
354
355
  } else {
355
356
  f[col.name] = {
356
357
  contains: filters.value[col.name]
357
358
  }
358
359
  }
359
-
360
360
  }
361
361
  }
362
362
  });
@@ -452,7 +452,7 @@ const filterFn = (val, update, abort) {
452
452
  </pre>
453
453
  rows:{{ props.rows }}
454
454
  </template>
455
-
455
+
456
456
  <q-table v-bind="attrs" :row-key="rowKey" :loading="loading" :rows="rows" ref="table" @request="onRequest"
457
457
  :rows-per-page-label="$t(props.rowsPerPageLabel)" :columns="renderColumns"
458
458
  :rows-per-page-options="rowsPerPageOptions" :selection="selection" v-model:pagination="pagination" :filter="filter">
@@ -516,8 +516,7 @@ const filterFn = (val, update, abort) {
516
516
 
517
517
  <template v-if="col.searchType == 'select'">
518
518
  <q-select dense v-model="filters[col.name]" @update:model-value="onFilters" clearable
519
- :options="col.searchOptions" @clear="onFilters" emit-value map-options
520
- :multiple="col.searchMultiple" />
519
+ :options="col.searchOptions" emit-value map-options :multiple="col.searchMultiple" />
521
520
 
522
521
  </template>
523
522
 
@@ -3,6 +3,7 @@ import { ref } from 'vue'
3
3
  import getModelColumns from "../../lib/getModelColumns";
4
4
  const onRequest = async (request) => {
5
5
  request.loadObjects("User", { status: status.value });
6
+ //request.loadObjects("User");
6
7
  };
7
8
  const columns = getModelColumns("User", [ "username", "first_name", "label_name", "email", "phone", "join_date", "status"]);
8
9
  const status = ref("0");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostlink/nuxt-light",
3
- "version": "0.0.96",
3
+ "version": "0.0.98",
4
4
  "description": "HostLink Nuxt Light Framework",
5
5
  "repository": "@hostlink/nuxt-light",
6
6
  "license": "MIT",