foundation-apps icon indicating copy to clipboard operation
foundation-apps copied to clipboard

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

Open valorekhov opened this issue 10 years ago • 3 comments

%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: '=?' },

valorekhov avatar Jul 17 '15 13:07 valorekhov

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

zurbchris avatar Dec 03 '15 21:12 zurbchris

@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 avatar Dec 07 '15 18:12 soumak77

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.

soumak77 avatar Dec 08 '15 03:12 soumak77