Skip to content
This repository has been archived by the owner on Sep 10, 2019. It is now read-only.

Add optional two-way binding for tracking open/closed status of individual accordion items #670

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

valorekhov
Copy link

%subj%
The above allows for external code to track open status of individual items in the accordion to execute additional actions, e.g. loading of external data on item open.
It's a simple change to the zfAccordionItem directive adding to following to the scope configuration object.
scope: {
active: '=?'
},

@zurbchris
Copy link
Contributor

Can you clean this up to only alter relevant individual files? We'll handle creating the /dist versions.

@soumak77
Copy link
Contributor

soumak77 commented Dec 7, 2015

@zurbchris @valorekhov

I'm going to add similar functionality to the zf-panel directive. I'll add it to other directives that would benefit with this change including the zf-accordion-item.

@soumak77
Copy link
Contributor

soumak77 commented Dec 8, 2015

I've implemented PR #740 to handle triggering active state messages for components that use the foundation sub/pub system to show/hide components. Accordions and Tabs do not use the foundation sub/pub system to handle changing active state of elements. In these cases, two-way binding of scope.active would have to be used to be notified of active state changes. The two-way bound value should be readonly until support is added to the Accordion and Tabs to allow changing active state outside of the directive.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

4 participants