diff --git a/src/components/common/VnSection.vue b/src/components/common/VnSection.vue
index 76856ef94..be7a3a121 100644
--- a/src/components/common/VnSection.vue
+++ b/src/components/common/VnSection.vue
@@ -4,6 +4,7 @@ import VnSearchbar from 'components/ui/VnSearchbar.vue';
import VnTableFilter from '../VnTable/VnTableFilter.vue';
import { onBeforeMount, computed } from 'vue';
import { useArrayData } from 'src/composables/useArrayData';
+import { useRoute } from 'vue-router';
const $props = defineProps({
section: {
@@ -40,8 +41,17 @@ const $props = defineProps({
},
});
-const sectionValue = computed(() => $props.section ?? $props.dataKey);
+const route = useRoute();
let arrayData;
+const sectionValue = computed(() => $props.section ?? $props.dataKey);
+const isMainSection = computed(() => {
+ const isSame = sectionValue.value == route.name;
+ if (!isSame && arrayData) {
+ arrayData.reset(['userParams', 'userFilter']);
+ }
+ return isSame;
+});
+
onBeforeMount(() => {
if ($props.dataKey)
arrayData = useArrayData($props.dataKey, {
@@ -74,6 +84,6 @@ onBeforeMount(() => {
-
+
diff --git a/src/components/ui/VnSearchbar.vue b/src/components/ui/VnSearchbar.vue
index 4e284d8e4..a2d3b9ee1 100644
--- a/src/components/ui/VnSearchbar.vue
+++ b/src/components/ui/VnSearchbar.vue
@@ -126,6 +126,7 @@ async function search() {
delete filter.params.search;
}
await arrayData.applyFilter(filter);
+ searchText.value = undefined;
}
diff --git a/src/pages/Order/Card/OrderSummary.vue b/src/pages/Order/Card/OrderSummary.vue
index b8016abac..ad06dfe43 100644
--- a/src/pages/Order/Card/OrderSummary.vue
+++ b/src/pages/Order/Card/OrderSummary.vue
@@ -221,7 +221,7 @@ async function handleConfirm() {
-
+
{{ props.row.quantity }}