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

Allow nested options #191

Closed
milosdakic opened this issue May 15, 2015 · 4 comments
Closed

Allow nested options #191

milosdakic opened this issue May 15, 2015 · 4 comments

Comments

@milosdakic
Copy link

Would be awesome to have nested options within options.

var options = [
  {
    value: 'one',
    label: 'One',
    options: [
      value: 'n-one',
      label: 'Nested One'
    ]
  }
];

When an option has more possible options, there would be a more property which indicates to the user that they need to perform a action to return more results or something similar. Render if options available otherwise if more is set, retrieve more options.

@dcousens
Copy link
Collaborator

Could you give a real world example of this? I'm struggling to understand where it might be useful.

@milosdakic
Copy link
Author

Nested options would allow you to do something like this:
image

@brianreavis
Copy link
Collaborator

Optgroup implementations get really hard to maintain. Isn't this solvable by just representing the hierarchy in the label? With custom rendering (#216) rendering out a good breadcrumb wouldn't be hard at all.

@iddan
Copy link

iddan commented Apr 12, 2017

But still, you can't get a title for optgroup with custom render

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants