Closed dfenerski closed 8 months ago
Thanks for this fix. I have created an internal incident DINC0034912. The responsible team will get in touch with you and follow-up here on github.
Thanks to @dfenerski for this fix! Until the new version is available we are using the following workaround that might be helpful to others who end up here. Just add this as a Custom Control and use it instead of the default sap.m.MenuItem.
sap.ui.define([
'sap/m/MenuItem',
'sap/ui/core/IconPool',
'sap/m/Image'
], function(MenuItem, IconPool, Image) {
"use strict";
var CustomMenuItem = MenuItem.extend("sap.m.CustomMenuItem");
CustomMenuItem.prototype._setVisualControl = function(vControl) {
vControl._getIcon = function(oItem) {
return IconPool.createControlByURI({
src: oItem.getIcon(),
useIconTooltip: false
}, Image);
}
this._setInternalRef(vControl, "_sVisualControl");
};
return CustomMenuItem;
});
Hello @dfenerski,
Thank you for your fix, it is now merged and will be available in the next UI5 release (version 1.122).
Best, Diana
This change would provide a fallback constructor to the
createControlByURI
call, which will then be used in case the providedsrc
is not in the icon pool.Solves #3928