How can I disable/enable the master-detail view pragmatically?

How can I disable/enable the master-detail view pragmatically?

I tried doing this:
<f7-button @click="$$(’.view-main’).toggleClass(‘view-master-detail’)">
But it will not update the UI element positions to the correct locations until I interact with elements on the page.

I found a solution:
toggleMasterViewLayout() {
const v = $$(’.view-main’)[0];
v.classList.toggle(‘view-master-detail’);
v.f7View.emit(‘viewMasterDetailBreakpoint’);
}

Would’ve been nice if this was documented. I had to search in the source code to find the event name.