-
-
Notifications
You must be signed in to change notification settings - Fork 105
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
In accordion I cannot set all items to be closed by default. #219
Comments
What about setting [
'items' => [
[
// [...],
'expand' => false
]
]
] |
@simialbi thank you for your response. I believe I have tried it. yii2-bootstrap4/src/Accordion.php Lines 138 to 146 in a0280a6
If I am not mistaken, it means that if none of the items have expand set to true, then set expand to true for the first item/group. Thank you for your time PS. I have already fixed the issue in my code. I just extended the class and overridden the function and it works for me. |
@algsupport you're right, it's done because of compatibility with yii\bootstrap\Collapse |
@simialbi I got that. But I think there should be a way to explicitly disable that behavior. Regards |
What steps will reproduce the problem?
Create an accordion widget with any number of groups.
What's expected?
All accordion groups to be closed by default.
What do you get instead?
First group is always rendered showing not matter what options I set.
Additional info
Hi everyone,
I am trying to created an accordion widget that by default has all it's groups not showing, but instead the first group is always showing by default.
I tried reading the source code from accordion.php it seems that the BC fix is enforcing this behavior without any option to configure it.
Did I miss anything?
Appreciate your input.
Regards
The text was updated successfully, but these errors were encountered: