-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tree : Fix PassThrough Options checkbox #7126
Closed
kyybo opened this issue
Sep 6, 2024
· 3 comments
· Fixed by #7160 · May be fixed by leoo1992/GeradorQRCode#95
Closed
Tree : Fix PassThrough Options checkbox #7126
kyybo opened this issue
Sep 6, 2024
· 3 comments
· Fixed by #7160 · May be fixed by leoo1992/GeradorQRCode#95
Labels
Component: Tailwind
Tailwind specific issue
Typescript
Issue or pull request is *only* related to TypeScript definition
Comments
kyybo
added
the
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
label
Sep 6, 2024
I think NodeCheckbox etc is correct so if you can submit a PR correcting the docs that would be great. |
melloware
added
Typescript
Issue or pull request is *only* related to TypeScript definition
and removed
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
labels
Sep 7, 2024
Neelabha29 and if you try to use the passtrough option |
kyybo
added a commit
to kyybo/primereact
that referenced
this issue
Sep 11, 2024
* replace the PassThrought options 'checkboxContainer' and 'checkbox' with 'nodeCheckbox'
melloware
pushed a commit
that referenced
this issue
Sep 11, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Component: Tailwind
Tailwind specific issue
Typescript
Issue or pull request is *only* related to TypeScript definition
Describe the bug
In the Tree component documentation, in the TreePassThroughOptions section, the properties
checkbox
andcheckboxContainer
are mentioned.I tried to get them to work, but without success :
<Tree value={nodes} selectionMode="checkbox" selectionKeys={selectedKeys} onSelectionChange={(e) => setSelectedKeys(e.value)} pt={{ checkbox: { 'aria-label': 'My aria label' } }} />
The checkbox input in DOM doesn't take the
aria-label
property.After looking at the code, I noticed that the passtrough
checkbox
andcheckboxContainer
options were never used. Instead, thenodeCheckbox
option is used, even though it's not mentioned in the documentation.This can be seen in the file UITreeNode.js on line 750.
So I tried using the
nodeCheckbox
option and it works.<Tree value={nodes} selectionMode="checkbox" selectionKeys={selectedKeys} onSelectionChange={(e) => setSelectedKeys(e.value)} pt={{ nodeCheckbox: { 'aria-label': 'My aria label' } }} />
Both checkbox input and checkbox container had the aria-label property :
So we'd need to either update the documentation or modify the implementation to ensure consistency between the two.
Reproducer
No response
System Information
Steps to reproduce the behavior
No response
Expected behavior
Either update the documentation or modify the implementation to ensure consistency between the two.
The text was updated successfully, but these errors were encountered: