Topic: Accordion/collapse
Damian Gemza staff answered 6 years ago
<mdb-squeezebox [multiple]="false" aria-multiselectable="true"> <mdb-item *ngFor="let item of itemsList"> <mdb-item-head> {{ item.title }} </mdb-item-head> <mdb-item-body> {{ item.description }} </mdb-item-body> </mdb-item> </mdb-squeezebox>
2KLIC pro commented 6 years ago
yes I am using the same code, and i upgrade it to angular 5, still the behaviour is same. please get back with the solution. I am blocked because of this i can not move further.Damian Gemza staff commented 6 years ago
Please, send me your's project without node_modules at d.gemza@mdbootstrap.com I'll investigate this.2KLIC pro commented 6 years ago
ok, let me figure it out first, if it is still not working, i will share the code.Damian Gemza staff answered 6 years ago
public itemsList:Object[] = [
{
title: 'Collapsible Group Item #1',
description: 'Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.'
},
{
title: 'Collapsible Group Item #2',
description: 'Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.'
},
{
title: 'Collapsible Group Item #3',
description: 'Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.'
}
]
Best Regards,
Damian
2KLIC pro commented 6 years ago
every single element or pro components are working fine, i am pretty sure about my code and component file. i checked the classes reflecting or not but classes on actual site are different that is the only cause, accordion is not working.Damian Gemza staff commented 6 years ago
2KLIC, could you provide me code of your's accordion and component.ts file ? It should works fine, because i've copied sample code from documentation and it works perfectly.2KLIC pro commented 6 years ago
.accordion { background: #fff; width: 100%; display: block; list-style-type: none; overflow: hidden; height: 40px; padding: 0; } this class getting applied, if i comment height in inspect then it is working bit okDamian Gemza staff commented 6 years ago
Please provide me your's environment configuration (os, browser, angular version, mdb version etc...).2KLIC pro commented 6 years ago
it is ubuntu, angular 4.3.6, browser i checked are firefox and chrome, mdb-version": "5.1.1"Damian Gemza staff commented 6 years ago
MDB is compatible only with Angular 5.x. Please update your's angular and check again if it works. Regards, Damian2KLIC pro commented 6 years ago
for mdb site <pre><div class="accordion"> <div class="card"></div> <div class="card"></div> </div></pre> code is like but for me it is like <pre><mdb-squeezebox> <div class="accordion"> <mdb-item><div class="card"></div></mdb-item> <mdb-item><div class="card"></div></mdb-item> </div> </mdb-squeezebox></pre>2KLIC pro commented 6 years ago
but earlier it was working fine, i don't think it is angular version issue. 1 month back when i started using mdb with angular 4 it was working. i did not update my code since then.FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Pro
- Premium support: No
- Technology: MDB Angular
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No