open smartmultiinput value help again (#1697)

This commit is contained in:
Michael Zinnöcker 2025-01-07 16:25:40 +01:00 committed by GitHub
parent 9c1548c90f
commit e8b3ac1736
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -782,7 +782,9 @@ sap.ui.define("z2ui5/SmartMultiInputExt", ["sap/ui/core/Control", "sap/m/Token",
}
const aTokens = oEvent.getSource().getTokens();
this.setProperty("rangeData", oEvent.getSource().getRangeData().map((oRangeData, iIndex) => {
oRangeData.tokenText = aTokens[iIndex].getText();
const oToken = aTokens[iIndex];
oRangeData.tokenText = oToken.getText();
oRangeData.tokenLongKey = oToken.data("longKey");
return oRangeData;
}));
this.fireChange();
@ -800,7 +802,10 @@ sap.ui.define("z2ui5/SmartMultiInputExt", ["sap/ui/core/Control", "sap/m/Token",
}));
//we need to set token text explicitly, as setRangeData does no recalculation
input.getTokens().forEach((token, index) => {
const sTokenText = aRangeData[index].TOKENTEXT;
const oRangeData = aRangeData[index];
token.data("longKey", oRangeData.TOKENLONGKEY);
token.data("range", null);
const sTokenText = oRangeData.TOKENTEXT;
if (sTokenText) {
token.setText(sTokenText);
}