@paris-ias/list 1.0.92 → 1.0.93
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/dist/module.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
icon
|
|
10
10
|
class="ml-auto"
|
|
11
11
|
v-bind="tooltip"
|
|
12
|
-
@click="rootStore.resetState(type)"
|
|
12
|
+
@click="rootStore.resetState(type, locale)"
|
|
13
13
|
>
|
|
14
14
|
<v-icon>mdi-restore</v-icon>
|
|
15
15
|
</v-btn>
|
|
@@ -20,7 +20,9 @@
|
|
|
20
20
|
|
|
21
21
|
<script setup>
|
|
22
22
|
import { useRootStore } from "../../../stores/root";
|
|
23
|
+
import { useI18n } from "#imports";
|
|
23
24
|
const rootStore = useRootStore();
|
|
25
|
+
const { locale } = useI18n();
|
|
24
26
|
const props = defineProps({
|
|
25
27
|
type: {
|
|
26
28
|
type: String,
|
|
@@ -30,7 +30,7 @@ export declare const useRootStore: import("pinia").StoreDefinition<"rootStore",
|
|
|
30
30
|
loadFiltersFromLocalStorage(type: string): void;
|
|
31
31
|
setFiltersCount(type: string): void;
|
|
32
32
|
updateRouteQuery(type: string): void;
|
|
33
|
-
resetState(type: string): void;
|
|
33
|
+
resetState(type: string, lang: string): void;
|
|
34
34
|
updateSort({ value, type, }: {
|
|
35
35
|
value: (number | string)[];
|
|
36
36
|
type: string;
|
|
@@ -118,7 +118,7 @@ export const useRootStore = defineStore("rootStore", {
|
|
|
118
118
|
};
|
|
119
119
|
router.replace({ query: routeQuery });
|
|
120
120
|
},
|
|
121
|
-
resetState(type) {
|
|
121
|
+
resetState(type, lang) {
|
|
122
122
|
const { $stores, $models } = useNuxtApp();
|
|
123
123
|
console.log("$models[type]: ", $models[type]);
|
|
124
124
|
if ($models[type] && $stores[type]) {
|
|
@@ -134,6 +134,7 @@ export const useRootStore = defineStore("rootStore", {
|
|
|
134
134
|
this.numberOfPages = 0;
|
|
135
135
|
this.setFiltersCount(type);
|
|
136
136
|
this.updateRouteQuery(type);
|
|
137
|
+
this.update(type, lang);
|
|
137
138
|
},
|
|
138
139
|
updateSort({
|
|
139
140
|
value,
|