Skip to content

Commit

Permalink
fix: filter-from-to.vue set null at falsy input value [WTEL-5576](htt…
Browse files Browse the repository at this point in the history
  • Loading branch information
dlohvinov committed Nov 22, 2024
1 parent bb4156c commit ccb6d0d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@webitel/ui-sdk",
"version": "24.12.4",
"version": "24.12.5",
"private": false,
"scripts": {
"dev": "vite",
Expand Down
6 changes: 4 additions & 2 deletions src/modules/QueryFilters/components/filter-from-to.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ export default {
},
async setFrom(value) {
const filterValue = { from: value, to: this.value.to };
const from = value ? value : null; // if value is empty, set it to null
const filterValue = { from, to: this.value.to };
await this.setValue({ filter: this.filterQuery, value: filterValue });
await this.setValueToQuery({
filterQuery: `${this.filterQuery}From`,
Expand All @@ -96,7 +97,8 @@ export default {
},
async setTo(value) {
const filterValue = { from: this.value.from, to: value };
const to = value ? value : null; // if value is empty, set it to null
const filterValue = { from: this.value.from, to };
await this.setValue({ filter: this.filterQuery, value: filterValue });
await this.setValueToQuery({
filterQuery: `${this.filterQuery}To`,
Expand Down

0 comments on commit ccb6d0d

Please sign in to comment.