Tabs element has disapear in code ?

Hi !

I’m looking to create tabs that could be dynamic. To build it, I was going to use this https://www.wix.com/velo/reference/$w/tabs/introduction . But in fact, when I’m adding tabs from wix element, i’m having this https://www.wix.com/corvid/reference/$w.HiddenCollapsedElement.html# element instead.

Is the doc on tabs too old ? Or am I adding the wrong element ?

Thanks a lot !

PS : I’m already using multiboxstate for a custom tabs, but for my actual problem the native tabs could be really interresting

The → “TAB-ELEMENT” must be a new implemented element, since i never have seen it before all the time.

You can find it here…

Tab - Velo API Reference - Wix.com

Hi ! Thanks for your reply.

It is what I did, but this element referred to HiddenCollapsedElement instead of TabsElement :

Always proove the code on your own!

If you would use some console-logs and test it on your own till end, you would recognize, that the code works. It’s only the CODE-AUTO-COMPLETION who makes some stroubles…

Take a look here…

CODE:

$w.onReady(function () {
    let myTabs = $w("#tabs1").tabs
    console.log("TABS: ", myTabs);
    let myTab = $w("#tabs1").tabs[0]
    console.log("TABS: ", myTab);

    let numberOfTabs = myTabs.length; // 3

    let firstTabId = myTabs[0].id; 
    console.log(firstTabId);
    let firstTabLabel = myTabs[0].label;
    console.log(firstTabLabel);
    let secondTabId = myTabs[1].id;
    console.log(secondTabId);
    let secondTabLabel = myTabs[1].label; 
    console.log(secondTabLabel);
    let thirdTabId = myTabs[2].id; 
    console.log(thirdTabId);
    let thirdTabLabel = myTabs[2].label;
    console.log(thirdTabLabel);
});

RESULT:

Hi !

It does work !

I’m really not use to dev environment that display an error but make it work.

Thanks for your time.

Yes it does :wink:, have fun and happy coding!

@Wix/Velo-Team: In this case, someone should take a look onto the CODE-AUTO-COMPLETION, which is not working 100% stable.

AUTO-COMPLETION-ERROR…
Marked as ERROR, but works as expected. Surely just a little BUG-FIX.

And like always → Don’t forget to like it, if you really liked it :wink:

Hey! Thank you for this. There is actually an open ticket for this issue but I have passed along your info to support so you will be notified via email once it is resolved. Thanks for reporting