Hi, am wondering what the best way is to implement the ability to switch views in a single page app.
From what I’ve seen, there isn’t a ‘Card View’ component, so options might include:
showing/hiding components (doesn’t work with some component, eg form)
adding / removing views from a parent component
using a tabview with no header
changing the css visibility of html container.
Multiview
Any suggestions on how best to switch views dynamically (e.g. a login view, a home page view, etc).
MultiView was designed exactly for such case. The non-visible views are operable by API but do not really rendered, so you can have a LOT of views inside of multiview without affecting the overall performance.
If you have any code snippet, where hiding doesn’t work for form - please share it. There is no technical limitations for hiding on type of view.
by the way, I have noticed that, if the views are different sizes, then they aren’t automatically sized properly. A manual resize of the browser is required.
This is presumably a side-effect of keeping the invisible views out of the dom until they are rendered.
Is there a refresh, or other function that one can call on the multiview after a new view is shown (alternatively, is this a bug that you can fix in the api)
Normally multiview will try adjust self to the new content automatically, so external call must not be necessary.
If you have some code snippet or demo page with problematic behavior - please share it.