CakePHP-Bootstrap / cakephp3-bootstrap-helpers

CakePHP 3.x Helpers for Bootstrap 3 and 4.
https://holt59.github.io/cakephp3-bootstrap-helpers/
MIT License
130 stars 79 forks source link

PanelHelper - add option to specify the initial state of collapsable panel #113

Closed Antoniossss closed 7 years ago

Antoniossss commented 7 years ago

Hey

Right now following code <?= $this->Panel->create("Filters", ["collapsible" => true]) ?> will output collapsable panel that is initially open. Additional option for initial state would be very usefull. Another aproach would be to add consider integer value for collapsible so 0 = false, 1 true, initially open, >1 true, initially closed.

Holt59 commented 7 years ago

There is already a open option, you should be able to do:

echo $this->Panel->create('Filters', ['collapsible' => true, 'open' => false]);

If this does not work, this is a bug.

Antoniossss commented 7 years ago

I was convinced that I have already checked that out, but I was obviously wrong. I dont know why did I missed that reading the source code :( Sorry for troubles. open option works as expected.

Holt59 commented 7 years ago

No problem, the documentation has been updated recently and is now much more complete so you may find relevant information without having to look at the sources:

https://holt59.github.io/cakephp3-bootstrap-helpers/panel-helper/basics/

https://holt59.github.io/cakephp3-bootstrap-helpers/api/class-Bootstrap.View.Helper.PanelHelper.html

Antoniossss commented 7 years ago

Thank you, keep up the good work.