Tree Component: Custom template gives error when trying to close an expanded item using the keyboard #6307
Labels
Type: Bug
Issue contains a defect related to a specific component.
Milestone
Describe the bug
When using a custom togglerTemplate with the Tree component and using the keyboard you are able to expand an item that contains children, but when trying to close the expanded item you get an error. The issue is present in the documentation as well.
Console error:
framework-4ed89e9640adfb9e.js:1 Uncaught TypeError: Cannot read properties of null (reading 'click')
at V (5894-ffb4bb7601042570.js:1:14484)
at R (5894-ffb4bb7601042570.js:1:13815)
at Object.Oe (framework-4ed89e9640adfb9e.js:1:16878)
at Ae (framework-4ed89e9640adfb9e.js:1:17032)
at framework-4ed89e9640adfb9e.js:1:36932
at Ir (framework-4ed89e9640adfb9e.js:1:37026)
at Ur (framework-4ed89e9640adfb9e.js:1:37441)
at framework-4ed89e9640adfb9e.js:1:42883
at ss (framework-4ed89e9640adfb9e.js:1:106552)
at Le (framework-4ed89e9640adfb9e.js:1:16010)
Reproducer
No response
PrimeReact version
10.6.2
React version
18.x
Language
TypeScript
Build / Runtime
Create React App (CRA)
Browser(s)
Chrome 123
Steps to reproduce the behavior
Expected behavior
Should be able to contract items in the tree using the keyboard as well
The text was updated successfully, but these errors were encountered: