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

TreeTable and TreeSelect: Output emits wrong type (TreeTable.onNodeExpand and TreeSelect.onNodeUnselect and .onNodeSelect) #13415

Closed
BeGj opened this issue Aug 1, 2023 · 2 comments · Fixed by #13416
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@BeGj
Copy link
Contributor

BeGj commented Aug 1, 2023

Describe the bug

  1. TreeTable
    onNodeExpand currently emits TreeTableNode but it actually emits a object with the TreeTableNodeExpandEvent type.

  2. TreeSelect
    onNodeUnselect currently emits TreeNode but it actually emits an object with the TreeNodeUnSelectEvent type.
    onNodeSelect currently emits TreeNode but it actually emits an object with the same type as TreeNodeUnSelectEvent

Environment

not relevant for this.

Reproducer

No response

Angular version

16.1.5

PrimeNG version

16.0.2

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

lts

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

Expects all output emitters to emit the type {originalEvent: event, node: TreeNode}

@BeGj BeGj added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Aug 1, 2023
@BeGj
Copy link
Contributor Author

BeGj commented Aug 1, 2023

Created a fix in a pull request #13416.
Hoping for someone to solve this.

@BeGj
Copy link
Contributor Author

BeGj commented Aug 1, 2023

Also on a completely different topic.
It would be nice if we could kill all those any types in the Tree components. And also make all the TreeNode interfaces and corresponding events generic so they would return an event with the typed data you're using.

@mertsincan mertsincan added Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Aug 29, 2023
@mertsincan mertsincan added this to the 16.2.1 milestone Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
2 participants