Skip to content
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

Component: TreeTable selection binding no longer allows for single selection #13869

Closed
lwestfall opened this issue Oct 12, 2023 · 1 comment · Fixed by #13874
Closed

Component: TreeTable selection binding no longer allows for single selection #13869

lwestfall opened this issue Oct 12, 2023 · 1 comment · Fixed by #13874
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@lwestfall
Copy link
Contributor

Describe the bug

#13255 fixed the selection binding for multiple selection mode while simultaneously breaking it in single selection mode.

Environment

N/A

Reproducer

No response

Angular version

^16.2.0

PrimeNG version

~16.4.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.12.0

Browser(s)

No response

Steps to reproduce the behavior

// in component class declaration
selectedNode: TreeNode;
<!-- in template - condensed to issue -->
<p-treeTable [(selection)]="selectedNode">

Expected behavior

TreeTable should allow binding either TreeTable or TreeTable[].

@lwestfall lwestfall added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Oct 12, 2023
@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Oct 26, 2023
@cetincakiroglu cetincakiroglu added this to the 16.6.0 milestone Oct 26, 2023
@vrjaroslav
Copy link

When this fix will be release ? I use version: 16.8.0 and I still getting error: Type 'TreeNode | TreeNode[] | null' is not assignable to type 'TreeNode'.
Type 'null' is not assignable to type 'TreeNode'

In code:

<p-tree selectionMode="single" [(selection)]="selectedTreeNode" />

and selectedTreeNode: TreeNode;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants