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: Custom node toggle icon does not apply #7058

Open
2 of 4 tasks
moduly-solutions-slechner opened this issue Jan 8, 2025 · 1 comment
Open
2 of 4 tasks
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@moduly-solutions-slechner
Copy link

moduly-solutions-slechner commented Jan 8, 2025

Describe the bug

When using the TreeTable component and trying to customize the toggle icon, by following docs I'd have to use the column slot (from the column with "expander" flag I suppose, not clear from reading the docs). However, this does not work and the default icon is still displayed. See reproducer.

Pull Request Link

No response

Reason for not contributing a PR

  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other

Other Reason

Maybe I am just misunderstanding the docs, but if so, maybe you can make it clearer.

Reproducer

https://stackblitz.com/edit/primevue-4-vite-issue-template-zvekqtu5?file=src%2FApp.vue

Vue version

3.4.31

PrimeVue version

4.2.5

Node version

18.20.3

Browser(s)

Chrome

Expected behavior

I expect the default toggle icon to get replaced by the one specified in the #nodetoggleicon template (e.g. apple icon in reproducer).

@moduly-solutions-slechner moduly-solutions-slechner added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 8, 2025
@moduly-solutions-slechner
Copy link
Author

moduly-solutions-slechner commented Jan 9, 2025

I just noted, that you can pass an icon in the data itself. The TreeNode has options expandedIcon and collapsedIcon. This is quite confusing because at least for me it is not clear whether to use these options or the slots from the Column. There's some ambiguity in the docs.

Besides this, using these options also don't work for me. It just makes the default expansion/collapsing icon disappear without injecting the specified one.

@moduly-solutions-slechner moduly-solutions-slechner changed the title TreeTable: Node toggle icon does not apply TreeTable: Custom node toggle icon does not apply Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

1 participant