openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

sap.m.IconTabBar.removeItem() : Regression from 1.16.8

Open trevornc opened this issue 12 years ago • 5 comments

OpenUI5 version: 1.18.8+ Browser/version (+device/version): n/a Any other tested browsers/devices(OK/FAIL): n/a URL (minimal example if possible):n/a

Steps to reproduce the problem:

The documentation states that the removeItem() function for the IconTabBar takes the item, index or id of the item to be removed. Using the 1.16.8 SDK I used the id. This no longer works and the only type excepted is the item object. Additionally, the doc states that either the item removed or null is returned from the function, which is also no longer true as there is no return function specified in the code.

This prototype was added in 1.18.8 and it does not match the currently documented api:

sap.m.IconTabBar.prototype.removeItem = function(oItem) { if (!(oItem instanceof sap.m.IconTabSeparator)) { var sKey = oItem.getKey(); this._aTabKeys.splice(this._aTabKeys.indexOf(sKey) , 1); } this.removeAggregation("items", oItem); };

Either the doc or the code needs to be updated.

trevornc avatar Mar 14 '14 14:03 trevornc

Regression introduced with commit (internal:4c7a859b73a98e86920258346c6f102f680bb0d3), in 1.18 and 1.20.

Thanks!

akudev avatar Mar 14 '14 15:03 akudev

This is the demo for the problem: http://jsbin.com/noladito/3/edit?html,output

The change is on its way...

sirion avatar Mar 14 '14 15:03 sirion

Thank you for the quick response.

trevornc avatar Mar 14 '14 16:03 trevornc

Hi trevornc,

the change is merged (internally) and will be part of the next build/patch.

regards, Jens

PS: I will close this issue when the build is available.

sirion avatar Mar 17 '14 11:03 sirion

Fixed in 1.18.10, which is available now. Thanks for reporting!

akudev avatar Mar 19 '14 11:03 akudev