Issue - I kept a particular item expanded at one tab and try to expand the same item in another tab when I click on the expand button at this point, it is not able to search "close-section" and it is going to if condition.
toggleSection: function(component, event, helper) {
let sectionAuraId = event.target.getAttribute("data-auraId");
let sectionDiv = document.getElementById(sectionAuraId);
let sectionState = sectionDiv.getAttribute("class").search("close-section");
if(sectionState === -1) { //--section is opened..closing on click
$A.util.removeClass(sectionDiv, "open-section");
$A.util.addClass(sectionDiv, "close-section");
}else {//--section is closed..opening on click
$A.util.removeClass(sectionDiv, "close-section");
$A.util.addClass(sectionDiv, "open-section");
}
let currenttarget = event.currentTarget;
$A.util.toggleClass(currenttarget,"rotate-icon");
},