扩展输入建议宽度

Expand input suggestion width

当前宽度截图:

我正在尝试扩展上面的建议弹出窗口。

因为我想在 FilterBar 中使用它,输入字段很小,Table 变得有点没用了。当尝试使用 Inspector 更改 width 时,它会立即变回。

我使用的演示代码相当简单。

<Input xmlns="sap.m"
  showSuggestion="true"
  showTableSuggestionValueHelp="false"
  suggestionRows="{/ZSD_DebiaSet}"
  width="200px">
  <suggestionColumns>
    <Column popinDisplay="Inline" demandPopin="true">
      <Label text="Name"/>
    </Column>
    <Column hAlign="Center" popinDisplay="Inline" demandPopin="true" minScreenWidth="Tablet">
      <Label text="Product ID"/>
    </Column>
    <Column hAlign="Center" popinDisplay="Inline" minScreenWidth="Tablet">
      <Label text="Supplier Name"/>
    </Column>
    <Column hAlign="End" popinDisplay="Inline" demandPopin="true">
      <Label text="Price"/>
    </Column>
  </suggestionColumns>
  <suggestionRows>
    <ColumnListItem>
      <!-- ... -->
    </ColumnListItem>
  </suggestionRows>
</Input>

sap.m.Input 扩展的控件(即包括 sap.m.MultiInput)有一个名为 maxSuggestionWidth 的 属性,这将使您有比 table 更广泛的建议输入的实际宽度。在此处检查 属性:https://openui5.hana.ondemand.com/api/sap.m.Input#methods/setMaxSuggestionWidth

If set, the value of this parameter will control the horizontal size of the suggestion list to display more data. This allows suggestion lists to be wider than the input field if there is enough space available. By default, the suggestion list is always as wide as the input field.

Note: The value will be ignored if the actual width of the input field is larger than the specified parameter value.

我添加了这个属性,值为500px(仅用于测试),结果如下(Input宽度为200px):

我想这就是您要找的^^ 希望对您有所帮助!