TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ahmed elbarbary
NA
1.6k
275.4k
button accordion not work when collapse or expand?
May 30 2020 6:14 PM
I work on angular 7 app I face issue button accordion not work when collapse or expand main report categories .
under toggle function called by accordion Index send success and function GetreportByCategoryId work and display data from category selected menu
but accordion button not work when collapse or expand data specific report category from side menu .
So How to solve this issue please ?
toggleAccordian(event, index) {
var
element = event.target;
element.classList.toggle(
"active"
);
this
._displayreport.GetreportByCategoryId(index);
}
button accordion on html :
<ul *ngFor=
"let rep of allReportCategories;let i = index;"
style=
"margin-top:2px;"
class
=
"page-sidebar-menu"
data-keep-expanded=
"false"
data-auto-scroll=
"true"
data-slide-speed=
"200"
>
<span ><button
class
=
"accordion"
(click)=
"toggleAccordian($event, rep.reportCategoryID)"
>{{rep.reportCategory}}</button></span>
result of getcategory by id for index 4 pcnflow as below :
0: {reportID: 2022, reportName: "PCN Statistic", procedureName: null, iconClass: "icon-rocket", isDeleted: false, …}
1: {reportID: 2023, reportName: "PCN Dunlicate (Year)", procedureName: null, iconClass: "icon-wallet", isDeleted: false, …}
2: {reportID: 2024, reportName: "PCN Duplicate (Suppliers)", procedureName: null, iconClass: "icon-briefcase", isDeleted: false, …}
3: {reportID: 2028, reportName: "PCN Teams", procedureName: null, iconClass: "icon-wallet", isDeleted:
stackbliz to full example for more details exist below ;
https://stackblitz.com/edit/create-1arrvm?file=app%2Fapp.component.html
Reply
Answers (
2
)
I try to make left side menu Collapse as accordion in angula
when filter data by using fieldnamefilter variable it give m