From 9ef7964ff57823b875a229078e9f85c04abd5481 Mon Sep 17 00:00:00 2001 From: dlohvinov Date: Thu, 19 Sep 2024 14:47:49 +0300 Subject: [PATCH] 24.10.14: small filters module fixes [WTEL-3392] --- package-lock.json | 2 +- package.json | 2 +- src/modules/Filters/components/filter-search.vue | 2 +- src/store/new/modules/tableStoreModule/tableStoreModule.js | 7 +++++-- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 45dd7805b..f61e8485e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@webitel/ui-sdk", - "version": "24.10.3", + "version": "24.10.7", "dependencies": { "@floating-ui/vue": "^1.0.1", "@morev/vue-transitions": "^3.0.2", diff --git a/package.json b/package.json index e24565291..e51ef40fd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@webitel/ui-sdk", - "version": "24.10.12", + "version": "24.10.14", "private": false, "scripts": { "dev": "vite", diff --git a/src/modules/Filters/components/filter-search.vue b/src/modules/Filters/components/filter-search.vue index 403db8ce3..04bc8319c 100644 --- a/src/modules/Filters/components/filter-search.vue +++ b/src/modules/Filters/components/filter-search.vue @@ -71,7 +71,7 @@ const v$ = { $autoDirty: true }, ); -v$.value.$touch(); +if (v$) v$.value.$touch(); async function changeMode({ value }, { clearValue = true } = {}) { if (clearValue) await setValue({ name: filterName.value, value: '' }); diff --git a/src/store/new/modules/tableStoreModule/tableStoreModule.js b/src/store/new/modules/tableStoreModule/tableStoreModule.js index d276b4165..a09e47ba5 100644 --- a/src/store/new/modules/tableStoreModule/tableStoreModule.js +++ b/src/store/new/modules/tableStoreModule/tableStoreModule.js @@ -1,5 +1,8 @@ import FilterEvent from '../../../../modules/Filters/enums/FilterEvent.enum.js'; -import { queryToSortAdapter, sortToQueryAdapter } from '../../../../scripts/sortQueryAdapters.js'; +import { + queryToSortAdapter, + sortToQueryAdapter, +} from '../../../../scripts/sortQueryAdapters.js'; const state = () => ({ headers: [], @@ -18,7 +21,7 @@ const getters = { FIELDS: (state) => { const fields = state.headers.reduce((fields, { show, field }) => { - if (show) return [...fields, field]; + if (show || show === undefined) return [...fields, field]; return fields; }, []);