Skip to Content
0

sap.m.input with suggestions, problems with autocomplete

Jan 12, 2017 at 01:29 PM

33

avatar image

Hi,

I have a sap.m.input control with suggestion, the problem is that chrome also show a "autocomplete" based on the history.
This is very annoying.

I've been able to work around this partially by adding in the onAfterRendering:
$("#idPurchase--inpItem-inner").attr("autocomplete","off");

but the control gets disabled when a selection has made.
Via a button the control can be enabled again and after enabling the autocomplete attribute has gone and cannot be set anymore.

Control :

<Input id="inpItem" enabled="{=${modItemInfo>/ItemCode} === undefined}"
type="Text" placeholder="Enter Name or Code ..." showSuggestion="true"
showValueHelp="true" valueHelpRequest="handleValueHelp"
suggestionItems="{modItemInfo>/data}" suggest="handleItemInfoSuggest"
suggestionItemSelected="handleItemChange" startSuggestion="3"
maxSuggestionWidth="1000px" width="40em">
<suggestionItems>
<core:ListItem text="{modItemInfo>ItemName}"
additionalText="{modItemInfo>ItemCode}">
</core:ListItem>
</suggestionItems>
</Input>

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers