How to reduce a detail?

Good morning everyone, could someone give me some advice?

Using details, Jmix2.5, in execution, depending on what happens on the screen, would it be possible to reduce the details, or expand them?

Some screens are very long, especially with filters, the intention would be to search and return data, reduce the filters, but if the user expands, he can manipulate them again,

The problem is precisely this automatic “reduction”, like collapsed.

Any good soul with a tip?

Hi, @mpedrotti

You can use the com.vaadin.flow.component.details.Details#setOpened method to expand or collapse the details component programmatically after the data is loaded. For example, it can be done in the io.jmix.flowui.model.CollectionLoader.PostLoadEvent event handler.

Regards,
Maria.

Thanks for the help… @m.orlova

but the solution was simpler

grFiltro.setOpened(ocultar); // (true - false)