cancel
Showing results for 
Search instead for 
Did you mean: 

Removing subItems from sap.ui.ux3.NavigationItem

Former Member
0 Kudos

Hi

My top navigation item has three subitems

I tried to remove a sub item from a this top navigation item .

using

topNavigation.removeSubItem(index | id | ref to subitem)

this method, however, works correctly only if I try

remove the first subitem.

Any comment.?

Is it a bug.?

regards

Yuval

Accepted Solutions (1)

Accepted Solutions (1)

former_member182862
Active Contributor
0 Kudos

I think it is a bug. You can use destroySubItems() as workaround 😞

JS Bin - Collaborative JavaScript Debugging

Former Member
0 Kudos

Hi Denis

Thank you. Just what I thought. Opened OSS

Anyway, do you know how to programmatically set

the focus on one of the subitem (so that the little arrow appears

beneath it)

regards

Yuval

former_member182862
Active Contributor
0 Kudos

Hi Yuval

There are no little arrow for subitem. Am I right?

Thanks

-D

Former Member
0 Kudos

Hi

I found that removing subitems

should be done as follows:

var sCurrentSelectedItem = oShell.getSelectedWorkItem(); // returns the name

var mainWorkItem = sap.ui.getCore().byId('myTopItem');

var oCurrentSelectedItem =ap.ui.getCore().byId(sCurrentSelectedItem );

mainWorkItem.removeSubItem(oCurrentSelectedItem );

I hope it helps others

yuval

Answers (0)