sap.m.IconTabBar.removeItem() : Regression from 1.16.8
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.
Regression introduced with commit (internal:4c7a859b73a98e86920258346c6f102f680bb0d3), in 1.18 and 1.20.
Thanks!
This is the demo for the problem: http://jsbin.com/noladito/3/edit?html,output
The change is on its way...
Thank you for the quick response.
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.
Fixed in 1.18.10, which is available now. Thanks for reporting!