Skip to content

Commit

Permalink
Merge pull request #202 from webitel/fix/reset-selected-value
Browse files Browse the repository at this point in the history
fix: add reset selected value when changing filters[WTEL-5744](https:…
  • Loading branch information
Lera24 authored Dec 18, 2024
2 parents b771ae3 + 0113583 commit 57b1dc9
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 11 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@vuelidate/core": "^2.0.3",
"@vuelidate/validators": "^2.0.4",
"@vueuse/core": "^11.0.3",
"@webitel/ui-sdk": "^24.12.27",
"@webitel/ui-sdk": "^24.12.28",
"axios": "^1.7.7",
"deep-equal": "^2.2.1",
"dompurify": "^3.1.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
</template>

<script setup>
import { computed, onUnmounted } from 'vue';
import { computed, onUnmounted, watch } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRouter } from 'vue-router';
import { useStore } from 'vuex';
Expand Down Expand Up @@ -164,6 +164,7 @@ const {
const {
namespace: filtersNamespace,
filtersValue,
restoreFilters,
subscribe,
Expand Down Expand Up @@ -206,11 +207,18 @@ const {
const refresh = () => {
// https://webitel.atlassian.net/browse/WTEL-5711
// because 'selected' needs to be updated [WTEL-5711]
// because 'selected' value needs cleaned
resetState();
loadData();
};
watch(() => filtersValue.value, () => {
// https://webitel.atlassian.net/browse/WTEL-5744
// because 'selected' value needs cleaned when changing filters
resetState();
});
</script>

<style lang="scss" scoped>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ import FilterPagination from '@webitel/ui-sdk/src/modules/Filters/components/fil
import { useTableFilters } from '@webitel/ui-sdk/src/modules/Filters/composables/useTableFilters.js';
import { useCardStore } from '@webitel/ui-sdk/store';
import { useTableStore } from '@webitel/ui-sdk/src/store/new/modules/tableStoreModule/useTableStore.js';
import { onUnmounted } from 'vue';
import { onUnmounted, watch } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRoute, useRouter } from 'vue-router';
import IconAction from '@webitel/ui-sdk/src/enums/IconAction/IconAction.enum.js';
Expand Down Expand Up @@ -173,6 +173,7 @@ const {
const {
namespace: filtersNamespace,
filtersValue,
restoreFilters,
subscribe,
Expand Down Expand Up @@ -208,12 +209,18 @@ const {
const refresh = () => {
// https://webitel.atlassian.net/browse/WTEL-5711
// because 'selected' needs to be updated [WTEL-5711]
// because 'selected' value needs cleaned
resetState();
loadData();
};
watch(() => filtersValue.value, () => {
// https://webitel.atlassian.net/browse/WTEL-5744
// because 'selected' value needs cleaned when changing filters
resetState();
});
</script>

<style lang="scss" scoped>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ import FilterPagination from '@webitel/ui-sdk/src/modules/Filters/components/fil
import DeleteConfirmationPopup
from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue';
import { useTableFilters } from '@webitel/ui-sdk/src/modules/Filters/composables/useTableFilters.js';
import { computed, onUnmounted } from 'vue';
import { computed, onUnmounted, watch } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRouter } from 'vue-router';
import { useTableEmpty } from '@webitel/ui-sdk/src/modules/TableComponentModule/composables/useTableEmpty.js';
Expand Down Expand Up @@ -163,6 +163,7 @@ const {
const {
namespace: filtersNamespace,
filtersValue,
restoreFilters,
subscribe,
Expand Down Expand Up @@ -205,11 +206,18 @@ const {
const refresh = () => {
// https://webitel.atlassian.net/browse/WTEL-5711
// because 'selected' needs to be updated [WTEL-5711]
// because 'selected' value needs cleaned
resetState();
loadData();
};
watch(() => filtersValue.value, () => {
// https://webitel.atlassian.net/browse/WTEL-5744
// because 'selected' value needs cleaned when changing filters
resetState();
});
</script>

<style lang="scss" scoped>
Expand Down

0 comments on commit 57b1dc9

Please sign in to comment.