-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Independent Collapsing Panel? #190
Comments
@kastork, this is pretty to implement, but I could see how a wrapper would be useful.
I think enough people might have this use case that it should be more easily covered by Panel, or some kind of derived component. I would be happy to contribute this, but it seems like Panel has a number of other things wrong with it, including collapsing whenever you use input fields inside of them, which makes me hesitant to add it myself. |
Agree with @eytan it seems like this should work. I wonder if a nice API for this would be:
@eytan #197 should be fixed now, it would be awesome if you were interested in contributing this feature, let me know if you have problems with any other problems with these components. |
+1 for independent collapsible panels. For now, I work around it by having an |
Yes...
...makes sense. It could also be aliased as:
We could change the API for the original behaviour to I'll get on this |
Alternatively, since we're not really talking about groups of panels, the mechanism could be part of Panel itself -- i.e., just let me place a Panel that knows how to collapse without having a PanelGroup in the picture at all. I guess this is the first case you're describing @stevoland. I guess the downside of this idea would be possible confusion when the goal is to have accordion behavior -- there's the potential of people trying to apply collapse semantics to Panels that are in PanelGroups that already have collapse semantics at work. |
@eytan. As for the collapsing when input fields are updated... I wonder if this can be controlled by arranging the bindings of the input field differently. What I mean is, make sure the changes in the input field don't cause React to want to re-render the entire panel, just the field or form inside the panel. |
You can do this today, add the |
I'm having trouble figuring out how to have panels that collapse and open, but are not exclusive of each other in a group... i.e., not an accordion behavior, but individually capable of collapsing or expanding.
I can roll my own application of the relevant bootstrap classes, but it seems like this ought to be an option on the Panel component.
Should how to do this be obvious? What's the formula?
The text was updated successfully, but these errors were encountered: