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

Example story with section/option groups #20

Open
techniq opened this issue Mar 3, 2018 · 0 comments
Open

Example story with section/option groups #20

techniq opened this issue Mar 3, 2018 · 0 comments

Comments

@techniq
Copy link
Owner

techniq commented Mar 3, 2018

Would be nice to have an example story on how to group options into sections similar to this downshift example. Probably utilizing ListSubheader.

Need to think how windowing (with react-virtualized) will work with the headers. At first I considered passing items as:

{
  section1: [{ text: '1', value: 1 }, { text: '2', value: 2 }, { text: '3', value: 3 }],
  section2: [{ text: '3', value: 3 }, { text: '4', value: 4 }]
  ...
}

but I'm not sure how this will work with height calculations. We'll need to measure both the headings and the items, but not make the headings selectable (which only happens if you call downshift's getItemProps).

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

1 participant