@asd20/ui-next 2.3.7 → 2.3.8

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.3.8](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.3.7...ui-next-v2.3.8) (2026-04-30)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * fix search results not persisting ([041aba0](https://github.com/academydistrict20/asd20-ui-next/commit/041aba02a5dc761ee3c5ca47ab18a364d369c0b5))
9
+
3
10
  ## [2.3.7](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.3.6...ui-next-v2.3.7) (2026-04-29)
4
11
 
5
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asd20/ui-next",
3
- "version": "2.3.7",
3
+ "version": "2.3.8",
4
4
  "private": false,
5
5
  "description": "ASD20 UI component library for Vue 3.",
6
6
  "license": "MIT",
@@ -1791,7 +1791,34 @@ export default {
1791
1791
 
1792
1792
  appendSearchContextToUrl(rawUrl) {
1793
1793
  if (!rawUrl || typeof rawUrl !== 'string') return rawUrl
1794
- return rawUrl
1794
+ const state = this.getCurrentSearchStateForRoute()
1795
+ if (!state) return rawUrl
1796
+ if (typeof window === 'undefined' || typeof URL === 'undefined') {
1797
+ return rawUrl
1798
+ }
1799
+
1800
+ const trimmedUrl = rawUrl.trim()
1801
+ if (!trimmedUrl) return rawUrl
1802
+ if (/^(#|mailto:|tel:|javascript:)/i.test(trimmedUrl)) return rawUrl
1803
+
1804
+ try {
1805
+ const resolvedUrl = new URL(trimmedUrl, window.location.href)
1806
+ if (resolvedUrl.origin !== window.location.origin) return rawUrl
1807
+
1808
+ const stateQueryValues = this.buildRouteSearchQueryValues(state)
1809
+ Object.entries(stateQueryValues).forEach(([key, value]) => {
1810
+ if (value === undefined || value === null || value === '') {
1811
+ resolvedUrl.searchParams.delete(key)
1812
+ return
1813
+ }
1814
+
1815
+ resolvedUrl.searchParams.set(key, value)
1816
+ })
1817
+
1818
+ return `${resolvedUrl.pathname}${resolvedUrl.search}${resolvedUrl.hash}`
1819
+ } catch (error) {
1820
+ return rawUrl
1821
+ }
1795
1822
  },
1796
1823
 
1797
1824
  async restoreSearchStateFromRoute() {