@primer/react 38.42.0 → 38.42.1-rc.5c79b6260
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 +6 -0
- package/dist/TreeView/useTypeahead.js +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @primer/react
|
|
2
2
|
|
|
3
|
+
## 38.42.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#8524](https://github.com/primer/react/pull/8524) [`0d5607c`](https://github.com/primer/react/commit/0d5607c3b29ab090a0a97d1532fdc3a066a37d3d) Thanks [@tay1orjones](https://github.com/tay1orjones)! - TreeView: Prevent typeahead errors and focus changes when typing in nested controls.
|
|
8
|
+
|
|
3
9
|
## 38.42.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -52,6 +52,7 @@ function useTypeahead(t0) {
|
|
|
52
52
|
if (!containerRef.current) return;
|
|
53
53
|
const container = containerRef.current;
|
|
54
54
|
const onKeyDown = function onKeyDown(event) {
|
|
55
|
+
if (!(event.target instanceof HTMLElement) || event.target.getAttribute("role") !== "treeitem") return;
|
|
55
56
|
if (!event.key || event.key.length > 1 || event.key === " ") return;
|
|
56
57
|
if (event.ctrlKey || event.altKey || event.metaKey) return;
|
|
57
58
|
searchValue.current = searchValue.current + event.key;
|
package/package.json
CHANGED