Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
When setting up tabs in a view they are collapsed until I resize container.
The code is taken straight from the documentation:
https://our.umbraco.com/apidocs/v8/ui/#/api/umbraco.directives.directive:umbTabsNav
markup:
<div ng-controller="My.Controller as vm"> <umb-tabs-nav tabs="vm.tabs" on-tab-change="vm.changeTab(tab)"> </umb-tabs-nav> <umb-tab-content ng-repeat="tab in vm.tabs" ng-show="tab.active" tab="tab"> <div ng-if="tab.alias === 'tabOne'"> <div>Content of tab 1</div> </div> <div ng-if="tab.alias === 'tabTwo'"> <div>Content of tab 2</div> </div> </umb-tab-content>
Controller
(function () { "use strict"; function Controller() { var vm = this; vm.changeTab = changeTab; vm.tabs = [ { "alias": "tabOne", "label": "Tab 1", "active": true }, { "alias": "tabTwo", "label": "Tab 2" } ]; function changeTab(selectedTab) { vm.tabs.forEach(function(tab) { tab.active = false; }); selectedTab.active = true; }; eventsService.on("tab.tabChange", function(name, args){ console.log("args", args); }); } angular.module("umbraco").controller("My.Controller", Controller); })();
/Jesper
This is Umbraco 8.8
Comment author was deleted
have you checked commit history on the directive? Maybe it is just a legacy directive? Since tabs are not default anymore...
No, I just checked the docs :-)
Time doesn't permit me to investigate so, for now, I have to change approach.
latest commit was sep 2019... so probably it's just broken...
https://github.com/umbraco/Umbraco-CMS/blob/v8/contrib/src/Umbraco.Web.UI.Client/src/common/directives/components/tabs/umbtabsnav.directive.js
Thanks Tim. I didn't consider the power of just looking at the files commit history like that :-)
We are using Umbraco 8.6.4 and we have the same issue when we create the tab list dynamically. When we initialize a static tabs list it's working fine.
I had a similar problem to this in v8.8.2, and for me, the solution was to change:
<div ng-controller="My.Controller as vm">
to:
<ng-form val-form-manager ng-controller="My.Controller as vm">
Cheers, Chris
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
umb-tabs-nav shows as collapsed until resize container
When setting up tabs in a view they are collapsed until I resize container.
The code is taken straight from the documentation:
https://our.umbraco.com/apidocs/v8/ui/#/api/umbraco.directives.directive:umbTabsNav
markup:
Controller
/Jesper
This is Umbraco 8.8
Comment author was deleted
have you checked commit history on the directive? Maybe it is just a legacy directive? Since tabs are not default anymore...
No, I just checked the docs :-)
Time doesn't permit me to investigate so, for now, I have to change approach.
Comment author was deleted
latest commit was sep 2019... so probably it's just broken...
https://github.com/umbraco/Umbraco-CMS/blob/v8/contrib/src/Umbraco.Web.UI.Client/src/common/directives/components/tabs/umbtabsnav.directive.js
Thanks Tim. I didn't consider the power of just looking at the files commit history like that :-)
We are using Umbraco 8.6.4 and we have the same issue when we create the tab list dynamically. When we initialize a static tabs list it's working fine.
I had a similar problem to this in v8.8.2, and for me, the solution was to change:
<div ng-controller="My.Controller as vm">
to:
<ng-form val-form-manager ng-controller="My.Controller as vm">
Cheers, Chris
is working on a reply...