Select Menu detail view #184
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For some use cases it is useful to show extra content when browsing through a select menu. For those use cases I want to add a property to SelectMenu to render additional information on the right side of the Select Menu. In most of these cases you want complete control on the application side for what to show.
Design Example
When a detail view is passed, the Select Menu will add a border between the detail view and the right side.
API Design
Select Menu will get an additional prop
Usage example
The width of the detail view comes from the item being rendered in the detail view.
Uncertainties
I am not entirely sure about the right API for this, I am leaning towards
detailView. @Rowno pointed out we can simple use thechildrenprop for this instead, which would give a clean API, but might be slightly more ambiguous.Additionally, I am currently recreating the header with heading in the design example. We could add something like
detailViewTitlethat could add a title that is inline with the same style as the select menu.