@webitel/ui-datalist 1.0.71 → 1.0.73

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-datalist",
3
- "version": "1.0.71",
3
+ "version": "1.0.73",
4
4
  "description": "Toolkit for building data lists in webitel ui system",
5
5
  "scripts": {
6
6
  "make-all": "npm version patch --git-tag-version false && ( npm run lint:fix || true) && (npm run build:types || true) && npm run utils:publish",
@@ -179,10 +179,12 @@ https://webitel.atlassian.net/browse/WTEL-7014
179
179
  Clear filters button should be active only if filters are defined in the table-filter-panel. Excluding the search filter
180
180
  **/
181
181
 
182
- const listSelectedFilters = computed(()=>
183
- new Map([...props.filtersManager.filters].filter(([key]) => props.filterOptions.includes(key))));
182
+ const listSelectedFilters = computed(()=> {
183
+ const filterOptionsKeys = props.filterOptions.map(filter => typeof filter === 'string' ? filter : filter.name);
184
+ return new Map([...props.filtersManager.filters].filter(([key]) => filterOptionsKeys.includes(key)));
185
+ });
184
186
 
185
- const presetStore = props.usePresetsStore ? props.usePresetsStore() : null
187
+ const presetStore = props.usePresetsStore ? props.usePresetsStore() : null;
186
188
 
187
189
  const handleResetFilters = () => {
188
190
  emit('filter:reset-all')
@@ -207,8 +209,8 @@ const handleResetFilters = () => {
207
209
  }
208
210
  .table-filters-panel--dynamic-filters {
209
211
  display: flex;
210
- gap: var(--spacing-sm);
211
212
  flex-wrap: wrap;
213
+ gap: var(--spacing-sm);
212
214
  }
213
215
 
214
216
  .table-filters-panel--static-filters {
@@ -76,8 +76,19 @@ const v$ = useVuelidate(
76
76
  { $autoDirty: true }
77
77
  );
78
78
 
79
+ const initModel = () => {
80
+ if (!model.value) {
81
+ model.value = {
82
+ list: [],
83
+ unassigned: null,
84
+ };
85
+ }
86
+ };
87
+
79
88
  onMounted(() => {
80
89
  if(!props?.disableValidation) v$.value.$touch();
90
+
91
+ initModel();
81
92
  });
82
93
 
83
94
  watch(