Skip to content
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

fix(accordion): fixes inconsistent closeOthers behavior #4490

Merged

Conversation

maxokorokov
Copy link
Member

Previously closeOthers consistency was enforced only at the accordion level with accordion.toggle(itemId), accordion.expand(itemId), etc.

This change ensures that:

  • item.toggle(), item.expand() and item.collapsed = false respect that only one item stays open
  • only one item can be opened initially even with several with [collapse]="false"

cc @ValentinNelu

Previously `closeOthers` consistency was enforced only at the accordion level with `accordion.toggle(itemId)`, `accordion.expand(itemId)`, etc.

This change ensures that:
- `item.toggle()`, `item.expand()` and `item.collapsed = false` respect that only one item stays open
- only one item can be opened initially even with several with `[collapse]="false"`
@codecov-commenter
Copy link

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.01 ⚠️

Comparison is base (81ef4f9) 88.88% compared to head (4120ea5) 88.87%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4490      +/-   ##
==========================================
- Coverage   88.88%   88.87%   -0.01%     
==========================================
  Files         115      115              
  Lines        4101     4099       -2     
  Branches      867      864       -3     
==========================================
- Hits         3645     3643       -2     
  Misses        416      416              
  Partials       40       40              
Flag Coverage Δ
e2e 53.53% <5.26%> (-0.02%) ⬇️
unit 89.35% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/accordion/accordion.directive.ts 95.60% <100.00%> (-0.10%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@maxokorokov maxokorokov merged commit 77f667d into ng-bootstrap:master Apr 13, 2023
@maxokorokov maxokorokov added this to the 14.1.1 milestone Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants