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): callbacks for closing exclusive accordions #2879

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

lubber-de
Copy link
Member

Description

  • Exclusive accordions only triggered the callback for the opening according but not for all the closing ones.
  • Also added the ability to cancel any open/close by returning false from the onOpening/onclosing/onChanging callbacks

Testcase

https://jsfiddle.net/lubber/dmqpnLtu/9/

Closes

#2826

@lubber-de lubber-de added type/bug Any issue which is a bug or PR which fixes a bug type/feat Any feature requests or improvements state/awaiting-reviews Pull requests which are waiting for reviews javascript Pull requests that update Javascript code labels Aug 19, 2023
@lubber-de lubber-de added this to the 2.9.3 milestone Aug 19, 2023
@lubber-de lubber-de added the state/awaiting-docs Pull requests which need doc changes/additions label Aug 19, 2023
Copy link
Member

@ko2in ko2in left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't closeOthers reflect the onClosing callback? What if I want to keep opening the accordion item that was already opened? Now, it only listens to the accordion that triggered the click event.

@lubber-de
Copy link
Member Author

I put this on hold for now, as, after some investigation, the current logic would need more refactoring to support that properly and be consistent as "closeothers" behaves differently than just closing the active accordion.

@lubber-de lubber-de added state/on-hold Issues and pull requests which are on hold for any reason and removed state/awaiting-reviews Pull requests which are waiting for reviews labels Sep 1, 2023
@lubber-de lubber-de modified the milestones: 2.9.3, 2.9.x Sep 1, 2023
@lubber-de lubber-de marked this pull request as draft September 1, 2023 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code state/awaiting-docs Pull requests which need doc changes/additions state/on-hold Issues and pull requests which are on hold for any reason type/bug Any issue which is a bug or PR which fixes a bug type/feat Any feature requests or improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants