如何在较小的输入字段中显示 suggestionItems 中的附加文本

How to show additional text in suggestionItems in a smaller Input field

我的目标是实现一个自动完成功能,其工作原理如下:

  1. 输入内容...
  2. 获取括号中 aditionalText 的建议...
  3. 选择建议时,该字段会自动完成(只有值,没有附加信息!)

我的问题:

  1. 正在切断建议:

示例如下(我在某处找到了代码并对其进行了调整以显示我的问题):
https://jsbin.com/doyavawelo/1/edit?html,output

The suggestions are being cut off:

此问题是基于您的布局设置。

可能的解决方案:

  1. 更改您的 sap.ui.layout.GridData 设置
  2. 使用属性 maxSuggestionWidth调整建议列表弹出框宽度

When I use the aditionalText property, it is not displayed, and when I put the additional information inside the text property it becomes part of the autocompletion value:

解法:

  1. 这是一个dditionalText 不是ditionalText

Working CodeSnippet