TwitterBootstrapMvc icon indicating copy to clipboard operation
TwitterBootstrapMvc copied to clipboard

Support for individual panels

Open mikestu opened this issue 10 years ago • 4 comments

Hi Dmitry, In our app, we frequently use bootstrap panels for app sections in a page. These sections could be expanded when the page loads (or sometimes not), and the expand/collapse behavior may or may not be enabled as well. If multiple panels are on the same page, when one is expanded, the others do not collapse. I know you have the accordian support, but I don't see support for individual panels. Here is a sample of a stand-alone panel:

<div class="panel panel-info"><div class="panel-heading"><a class="accordian-toggle" href="#" data-toggle="collapse" data-target="#collapse1">Test Panel</a></div><div class="panel-collapse collapse in" id="collapse1"><div class="panel-body">        <p>This is a test</p>

Do you think this is something you could add support for?

mikestu avatar Nov 05 '14 21:11 mikestu

is that what you are looking for?

DmitryEfimenko avatar Nov 06 '14 09:11 DmitryEfimenko

I'm not sure how I missed that, but yes. :) The only thing that one doesn't seem to have is options for whether it can expand/collapse, and whether it is expanded/collapsed when the page is loaded (see my markup above). What are your thoughts on that request?

mikestu avatar Nov 06 '14 15:11 mikestu

So what do you exactly mean by "stand-alone" panel? Would that be exactly the same thing as an Accordion with just a single section (panel)? If not, what's the difference?

DmitryEfimenko avatar Dec 19 '14 05:12 DmitryEfimenko

Yes, that's pretty much it, but with the accordian, I don't think you can have multiple panels expand/collapse independent of any other panel in one accordian (which is really against the accordian concept). If I had 5 panels I want this way, I suppose I could create 5 accordians, each with one panel, but it would just be a tiny bit more verbose, and have an extra div around each one. Maybe it's not worth the effort to add expand/collapse to the single panels...not sure though.

mikestu avatar Dec 30 '14 16:12 mikestu