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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Error when adding accordion data dynamically

Thread ID:





143771 Apr 4,2019 01:37 PM UTC Apr 5,2019 09:25 AM UTC React - EJ 2 1
Tags: Accordion
Rikard Schouwstra
Asked On April 4, 2019 01:37 PM UTC

When using the following:
let accordionObj: Accordion = new Accordion({
items: [
{ header: 'Accordion Header', content: 'Accordion Content' },
{ header: 'Accordion Header', content: 'Accordion Content' },
{ header: 'Accordion Header', content: 'Accordion Content' }
I get the following issues: The accordion header gets darker each time I click until it is no longer visible.  I also get TypeError: Cannot read property 'content' of undefined, in console.  Any help would appreciated


Attachment: Screenshot_20190404_at_15.36.50_21ef0411.zip

Karthigeyan Krishnamurthi [Syncfusion]
Replied On April 5, 2019 09:25 AM UTC

Hi Rikard, 
Greetings from Syncfusion. 
We have prepared the sample to dynamically add the Accordion item and kindly refer the below API link. 
onChange() { 
      content: ' JavaScript (JS) is an interpreted computer programming language. ', 
      header: ' JavaScript ' 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon