We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Roadmap Question: When will the accordion have KnockoutJS support?

Thread ID:

Created:

Updated:

Platform:

Replies:

129103 Feb 27,2017 12:49 PM Mar 1,2017 01:13 AM JavaScript 3
loading
Tags: ejAccordion
Robert Mims
Asked On February 27, 2017 12:49 PM

And perhaps my workaround is all it takes, demo here.

Key, really, is just declaring a binding handler and adding the options via the value accessor:

        ko.bindingHandlers.accordion = {
          init: function (element, valueAccessor) {
            /// <summary>Initializes the ejAccordion binding handler</summary>
            var options = ko.utils.unwrapObservable(valueAccessor());
            
            $(element).ejAccordion(options);
          }
        };

I suppose this method could be used for any control lacking KnockoutJS support noted in this section of documentation.

Karthikeyan Viswanathan [Syncfusion]
Replied On February 28, 2017 06:15 AM

Hi Robert,   
   
Thanks for contacting Syncfusion Support.   
    
We already have KO support for Accordion control. You can render the Accordion using the below code. Please refer to the code snippet:   
   
<code>   
   
<div id="acc" data-bind="ejAccordion: { enableMultipleOpen: true }">   
             
   
</code>   
  
   
JS Playground sample link: http://jsplayground.syncfusion.com/3pnf05qt    
   
Regards,   
Karthikeyan V.  


Robert Mims
Replied On February 28, 2017 06:36 AM

Ha!

I tried it but must have had a typo. 

Thank you for pointing that out. 

That being said, an update to the aforementioned documentation section might also help clarify.

Thanks again.

Robert

Karthikeyan Viswanathan [Syncfusion]
Replied On March 1, 2017 01:13 AM

Hi Robert,    
Thanks for the update.     
    
We are glad the suggestion helped you to achieve your requirement.  We will update the specification in our future documentation.  
    
Please let us know if you need further assistance.     
  
Regards,  
Karthikeyan V.  


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;