@paris-ias/list 1.0.116 → 1.0.117

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@paris-ias/list",
3
3
  "configKey": "list",
4
- "version": "1.0.116",
4
+ "version": "1.0.117",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.0",
7
7
  "unbuild": "3.5.0"
@@ -13,10 +13,6 @@
13
13
  tile
14
14
  type="search"
15
15
  :loading="rootStore.loading"
16
- @keyup.enter="type === 'all' ? $router.push(localePath('/search')) : null"
17
- @click:append="
18
- type === 'all' ? $router.push(localePath('/search')) : null
19
- "
20
16
  >
21
17
  <!-- :loading="$nuxt.loading || $store.state.loading" :class="{ 'mt-3':
22
18
  $store.state.scrolled }" -->
@@ -18,6 +18,7 @@
18
18
  type="search"
19
19
  :loading="rootStore.loading"
20
20
  @keyup.enter="$router.push(localePath('/search'))"
21
+ @click:append="$router.push(localePath('/search'))"
21
22
  >
22
23
  <!-- :loading="$nuxt.loading || $store.state.loading" :class="{ 'mt-3':
23
24
  $store.state.scrolled }" -->
@@ -237,8 +237,15 @@ export const useRootStore = defineStore("rootStore", {
237
237
  search = "",
238
238
  lang = "en"
239
239
  }) {
240
+ const { $stores } = useNuxtApp();
240
241
  console.log("updateSearch", { type, search, lang });
241
- this.search = search;
242
+ if (type === "all") {
243
+ this.search = search;
244
+ } else {
245
+ if ($stores[type]) {
246
+ $stores[type].search = search;
247
+ }
248
+ }
242
249
  await this.update(type, lang);
243
250
  },
244
251
  async update(type, lang = "en") {
@@ -274,7 +281,10 @@ export const useRootStore = defineStore("rootStore", {
274
281
  // add the store module filters
275
282
  filters
276
283
  },
277
- ...this.search?.length && type === "all" && { search: this.search },
284
+ ...type === "all" && this.search?.length && { search: this.search },
285
+ ...type !== "all" && $stores[type].search?.length && {
286
+ search: $stores[type].search
287
+ },
278
288
  appId: "iea",
279
289
  lang
280
290
  })
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "license": "AGPL-3.0-only",
3
3
  "main": "./dist/module.mjs",
4
- "version": "1.0.116",
4
+ "version": "1.0.117",
5
5
  "name": "@paris-ias/list",
6
6
  "repository": {
7
7
  "url": "git+https://github.com/IEA-Paris/list.git",