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

CascadeSelect: optionGroupChildren doesn't work in string type #4944

Closed
yuugou727 opened this issue Dec 8, 2023 · 1 comment
Closed

CascadeSelect: optionGroupChildren doesn't work in string type #4944

yuugou727 opened this issue Dec 8, 2023 · 1 comment
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@yuugou727
Copy link

yuugou727 commented Dec 8, 2023

Describe the bug

Not sure it is wrong documentation or this feature should be fixed.

Document shows that the prop optionGroupChildren accepts both string and string[]. I have an option tree. Each layer has its children in children key. So I assigned :optionGroupChildren="'children'" but CascadeSelect was broken. It works only when I change it to ['children', 'children', 'children'].

Reproducer

https://stackblitz.com/edit/cd7uiz?file=src%2FApp.vue,src%2FmockTree.js

PrimeVue version

3.43.0

Vue version

3.x

Language

ES6

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

Switch :optionGroupChildren between 'children' and ['children', 'children', 'children'].

Expected behavior

CascadeSelect optionGroupChildren should accept string when option tree has same children key in each layer.

@yuugou727 yuugou727 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 8, 2023
@tugcekucukoglu tugcekucukoglu 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 Dec 8, 2023
@tugcekucukoglu tugcekucukoglu added this to the 3.44.0 milestone Dec 8, 2023
@tugcekucukoglu tugcekucukoglu self-assigned this Dec 8, 2023
@Sanjayashok2512
Copy link

how to dynamically generate the optionGroupChildren
my 1st parent have 3 nested children
my 2nd parent have 2 nested children
when i click the 1st parent the optionGroupChildren will be as ["children","children","children"]
when i click the 2nd parent optionGroupChildren will be as ["children","children"] will be update as this
how to do?????

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

No branches or pull requests

3 participants