Z
Z
zlodiak2018-12-26 13:45:09
Angular
zlodiak, 2018-12-26 13:45:09

How to close all accordions?

There is a table from the material library. Each row of the table opens/closes after a click. When I open several lines at the same time, I would like to close all open lines on some event (for example, clicking on a button).

I looked in the angular material documentation, but did not find such a function. This is strange, because such a function is likely to be in any similar table.

Please help close these

LIVE DEMO accordions here.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2018-12-26
@zlodiak

I looked in the angular material documentation, but did not find such a function. This is strange, because such a function is likely to be in any similar table.

And indeed - there is (closeAll). You just need to take a higher version of material (your demo uses 5.2.4, you need at least 6.0.0-beta-0).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question