Tabbar (multiview = true) first time addOption view is not visible

I can't seem to show the view when added first time with addOption and then addView. I need to add another tab and view, and from there on the first tab displays the view.

Can be shown in the below webix snippet

https://snippet.webix.com/19d35274

click "The Shawshank Redemption" and it still says "Pick a film from the list!" rather than show the movie description (title,year.votes). Only after you click on another movie from the list then click back to "The Shawshank Redemption" is the description shown.

Any ideas what I should do for this? (I have tried tabbar.refresh()) with no luck

Comments

  • edited July 24

    Hey @Tomk, I can think of one way you could go about this, please take a look at this example: https://snippet.webix.com/qbg723vd. In this example, I'm simply removing our placeholder template before we add the new subview

    // check if it exists and then remove it
    if ($$("tpl")) {
        $$("views").removeView($$("tpl"));
      }
    

    and add it once again after we delete all of our tabs/subviews.

  • Thanks that does the trick

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion