From: Alan Knowles Date: Thu, 28 Jan 2021 08:53:33 +0000 (+0800) Subject: Roo/bootstrap/NavItem.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=c418bb5c3f63d7cecce8a98cda721ed446adcf20 Roo/bootstrap/NavItem.js --- diff --git a/Roo/bootstrap/NavItem.js b/Roo/bootstrap/NavItem.js index 9491b332e7..5e0757b2b9 100644 --- a/Roo/bootstrap/NavItem.js +++ b/Roo/bootstrap/NavItem.js @@ -89,8 +89,10 @@ Roo.extend(Roo.bootstrap.NavItem, Roo.bootstrap.Component, { cls: 'nav-item' }; + cfg.cls = typeof(cfg.cls) == 'undefined' ? '' : cfg.cls; + if (this.active) { - cfg.cls = typeof(cfg.cls) == 'undefined' ? 'active' : cfg.cls + ' active'; + cfg.cls += ' active' ; } if (this.disabled) { cfg.cls += ' disabled'; @@ -126,7 +128,8 @@ Roo.extend(Roo.bootstrap.NavItem, Roo.bootstrap.Component, { } ]; if (this.tagtype == 'a') { - cfg.cn[0].cls = 'nav-link'; + cfg.cn[0].cls = 'nav-link' + (this.active ? ' active' : ''); + } if (this.icon) { cfg.cn[0].html = ' ' + cfg.cn[0].html + '';