I’m trying to build an app with a tabview. Due to an expensive and asynchronous operation (several AJAX calls to collect and prepare information) I need to change the tab’s content dynamically. It works as expected but when I change the tab, the dynamic content is either lost or not rendered.
I can confirm bug with replacing the view in hidden state, fix will be included in the next public build.
As for problem with view preserving - it does occurs because of the way how tabview works ( tab button is linked to the visible content by content’s id, which is not preserved in your sample )
The simplest way to workaround the issue - use nested layout in the tabview. http://webix.com/snippet/f3a92678
I have added the lines 13 and 18 here
I add a row after “webix.ui(content, $$(‘content’));”
and call a function Again()
the function Again changes the content-variable and does
“webix.ui(content, $$(‘content’));”
again, but nothing changes to the content!
could it be that the id “content” is overwritten one you substitute the content of that part with another content? I also tried to insert the “id” tag with the same value (“content”) in the overwriting structure; but didn’t manage to do it;
I have a similar problem: once overwritten, there’s no correct “id” anymore; and thought I could find the solution in this answer, but it doesn’t work;
what’s the correct way to overwrite a content n-times?
webix.ui( config, view ) command will replace view with new one, so yes, calling the same command second time will not cause any changes, as view already removed from the layout and replaced with a new ui.
If you need to use constant updates - use layout and slightly different syntax