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

Added the option to disable the click interaction on the headers #26

Merged
merged 2 commits into from
May 7, 2019
Merged

Conversation

elbojoloco
Copy link

Sometimes it's useful to disable manual opening/closing of the accordion, imagine a stepped procedure where the accordions need to be "fulfilled" in a specific order.

Instead of having to overwrite the click listener and use event.preventDefault() to then add custom functionality is not very clean, this is why I added the option to disable them easily. I myself use the vue wrapper of this package, which just forwards the props to settings. The result would look like this in both variants:

Vanilla

var accordion = new BadgerAccordion('.js-badger-accordion', {
    headersClickable: false
});

Vue

<badger-accordion :options="{ headersClickable: false }">
...
</badger-accordion>

@stuartjnelson stuartjnelson mentioned this pull request Apr 28, 2019
@stuartjnelson
Copy link
Owner

Hello!

Thanks for raising the PR. Sorry I haven't merged it in yet. I will get to it in the next few weeks.

All best,
Stuart

@stuartjnelson stuartjnelson merged commit bbce904 into stuartjnelson:develop May 7, 2019
stuartjnelson added a commit that referenced this pull request May 7, 2019
 - Security issue with `tar` package

 - Option `addListenersOnInit`. See [PR 26](#26) for more info
@stuartjnelson
Copy link
Owner

Hi @elbojoloco,

Thanks for the PR. I renamed the option to addListenersOnInit and updated the docs. You're on the contributors' list now.

Cheers!
Stuart

@elbojoloco elbojoloco deleted the develop branch June 14, 2019 10:00
@LordZardeck
Copy link

@stuartjnelson did this actually get released? Installed this from NPM @Version 1.2.3, but it's not in the code.

@stuartjnelson
Copy link
Owner

Sorry, @LordZardeck I've messed up the release. I'll get this sorted this weekend.

@stuartjnelson
Copy link
Owner

I've sorted this out now in 1.2.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants