Open Gustl22 opened 4 years ago
Can the grouped menu work for you?
Haven't tried yet, if this supports custom items instead of MenuItem
.
Anyway I noticed that I need a custom Header, too, which is not the case in MenuGroup
.
So it may be better to make my own component.
Can be closed or keep open, if want to implement such feature. Thanks for the response :)
@Gustl22 yup, there are too many options on how it should look. Especially when looking at the one you shared. But let's keep it open to see the interest and prioritize some time.
I think a good approach would be to make a collapsible Card
component (with animation), so that the header is always shown and the content is hided completely in collapsed state.
BTW: Used LayoutAnimation before collapse state change and adapted heights of Card and Header.
Here a demo of my implementation:
I can't find group menu for version 4.4 (Don't want to upgrade to 5 since it's still alpha)
@yogevlahyani v4 docs is here. See the version switcher at the top of the page.
@artyorsh Yes I know, MenuGroup isn't in the docs or in v4 in general
@yogevlahyani Yup, because there was no special component for that. This was achieved in a different and less customizable (that's why it was completely reimplemented) way. For v4, see sub-menu example in the old docs
@artyorsh Thanks! :)
Trying to do something similar here. I have a large form that I want to break up into chunks with an accordion-style layout. I tried to accomplish this using MenuGroups, but I can't find a way to customize MenuItem. Is this possible, or have people found a better solution for accordions?
Trying to do something similar here. I have a large form that I want to break up into chunks with an accordion-style layout. I tried to accomplish this using MenuGroups, but I can't find a way to customize MenuItem. Is this possible, or have people found a better solution for accordions?
I tried adding a View component to the MenuItem description prop but it causes layout issues (e.g. any Text component inside that View will overflow). Probably because the description prop is expecting Text.
Any updates on this? I think a collapse/toggle component would be helpful
I would also like this. MenuGroup is for selectable items. An accordion is just for hiding some details, but not for selecting. It is super common for accordions to appear in UIs. It's such an essential UI component.
Was it decided to not introduce this new component?
🚀 Feature Proposal
Customizable Component for collapse contents within an accordion.
Motivation & Example
I want to provide a list of exercises, the user can select. But I want to keep it all on the same page, to let the user browse faster the items. The items should then be expandable and collapsible (different defaults each item, customizable content or icon for header and body).
See bootstrap.
Please correct me, if this feature is already implemented somehow.