@graphcommerce/magento-search-overlay 10.0.3 → 10.0.4-canary.1
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 +10 -0
- package/components/SearchOverlayProvider.tsx +5 -3
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @graphcommerce/magento-search-overlay
|
|
2
2
|
|
|
3
|
+
## 10.0.4-canary.1
|
|
4
|
+
|
|
5
|
+
## 10.0.4-canary.0
|
|
6
|
+
|
|
7
|
+
### Patch Changes
|
|
8
|
+
|
|
9
|
+
- [#2580](https://github.com/graphcommerce-org/graphcommerce/pull/2580) [`c406bbd`](https://github.com/graphcommerce-org/graphcommerce/commit/c406bbd843af025c8315faf0831682b88dcfa6b3) - Use immediate input value for Enter navigation.
|
|
10
|
+
|
|
11
|
+
Modified SearchOverlayProvider to pull the search query directly from the event target during the Enter key event. This prevents the "partial query" bug caused by navigating with the lagging debounced state. ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
|
|
12
|
+
|
|
3
13
|
## 10.0.3
|
|
4
14
|
|
|
5
15
|
## 10.0.3-canary.0
|
|
@@ -123,9 +123,11 @@ export function SearchOverlayProvider(props: SearchOverlayProviderProps) {
|
|
|
123
123
|
const element = items.current[selectedIndex]?.current
|
|
124
124
|
element?.click()
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
const targetValue = (event.target as HTMLInputElement).value
|
|
127
|
+
|
|
128
|
+
if (!element && targetValue) {
|
|
127
129
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
128
|
-
router.push(`/search/${encodeURIComponent(
|
|
130
|
+
router.push(`/search/${encodeURIComponent(targetValue)}`)
|
|
129
131
|
}
|
|
130
132
|
} else {
|
|
131
133
|
setSelectedIndex(-1)
|
|
@@ -140,7 +142,7 @@ export function SearchOverlayProvider(props: SearchOverlayProviderProps) {
|
|
|
140
142
|
}
|
|
141
143
|
},
|
|
142
144
|
}),
|
|
143
|
-
[
|
|
145
|
+
[router, selectedIndex],
|
|
144
146
|
)
|
|
145
147
|
|
|
146
148
|
return (
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/magento-search-overlay",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "10.0.
|
|
5
|
+
"version": "10.0.4-canary.1",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -12,18 +12,18 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@graphcommerce/ecommerce-ui": "^10.0.
|
|
16
|
-
"@graphcommerce/eslint-config-pwa": "^10.0.
|
|
17
|
-
"@graphcommerce/framer-utils": "^10.0.
|
|
18
|
-
"@graphcommerce/graphql": "^10.0.
|
|
19
|
-
"@graphcommerce/image": "^10.0.
|
|
20
|
-
"@graphcommerce/magento-product": "^10.0.
|
|
21
|
-
"@graphcommerce/magento-search": "^10.0.
|
|
22
|
-
"@graphcommerce/magento-store": "^10.0.
|
|
23
|
-
"@graphcommerce/next-ui": "^10.0.
|
|
24
|
-
"@graphcommerce/prettier-config-pwa": "^10.0.
|
|
25
|
-
"@graphcommerce/react-hook-form": "^10.0.
|
|
26
|
-
"@graphcommerce/typescript-config-pwa": "^10.0.
|
|
15
|
+
"@graphcommerce/ecommerce-ui": "^10.0.4-canary.1",
|
|
16
|
+
"@graphcommerce/eslint-config-pwa": "^10.0.4-canary.1",
|
|
17
|
+
"@graphcommerce/framer-utils": "^10.0.4-canary.1",
|
|
18
|
+
"@graphcommerce/graphql": "^10.0.4-canary.1",
|
|
19
|
+
"@graphcommerce/image": "^10.0.4-canary.1",
|
|
20
|
+
"@graphcommerce/magento-product": "^10.0.4-canary.1",
|
|
21
|
+
"@graphcommerce/magento-search": "^10.0.4-canary.1",
|
|
22
|
+
"@graphcommerce/magento-store": "^10.0.4-canary.1",
|
|
23
|
+
"@graphcommerce/next-ui": "^10.0.4-canary.1",
|
|
24
|
+
"@graphcommerce/prettier-config-pwa": "^10.0.4-canary.1",
|
|
25
|
+
"@graphcommerce/react-hook-form": "^10.0.4-canary.1",
|
|
26
|
+
"@graphcommerce/typescript-config-pwa": "^10.0.4-canary.1",
|
|
27
27
|
"@lingui/core": "^5",
|
|
28
28
|
"@lingui/macro": "^5",
|
|
29
29
|
"@lingui/react": "^5",
|