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

TreeSelect modelValue / defaultValue doesn't displayed #7252

Open
1 of 4 tasks
levitomer opened this issue Feb 13, 2025 · 0 comments
Open
1 of 4 tasks

TreeSelect modelValue / defaultValue doesn't displayed #7252

levitomer opened this issue Feb 13, 2025 · 0 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@levitomer
Copy link

Describe the bug

I'm using TreeSelect component to show the hierarchy of my apps and app's groups:

Image

The issues found while using TreeSelect component are:

  1. In the attached code I set the defaultValue of the tree select component to a group called 'All Applications' with the key DEFAULT_ALL_APPLICATIONS_NODE_KEY. But it doesn't get selected (see attached screenshot)
  2. Also, the selectedNodeKey (if defined) should be selected in the tree select, i.e if the component receive a key as a prop (see props.selectedLocationId), then I expect it be seen as selected in the tree node.

For the protocol, you can see the TreeSelect have the respective options, and they are selectable.
Image

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

No response

Reproducer

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

Environment

Nothing special just as provided below, see stackblitz link

Vue version

3.5.13

PrimeVue version

4.2.5

Node version

22.13.0

Browser(s)

Chrome

Steps to reproduce the behavior

  1. Providing a key via v-model / modelValue / defaultValue isn't reflected in the TreeSelect UI

Expected behavior

  1. Given key will be selected if provided via v-model / modelValue / defaultValue
@levitomer levitomer added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 13, 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