cancel
Showing results for 
Search instead for 
Did you mean: 

MultiInput does not show correctly with one element

julian-s
Participant
0 Kudos

We currently experience a problem with the MultiInput, when setting tokens via JavaScript.

We are using the control to assign multiple emails, validate it and store it inside of it. As soon as we are using a smaller device, it won't show anymore the single element, instead it shows us the n-info message "1 Element":

Instead, it should display us a text ellipsis in the end, when the first element cannot be displayed fully, as in the samples of SAP: https://sapui5.hana.ondemand.com/1.88.0/#/entity/sap.m.MultiInput/sample/sap.m.sample.MultiInput

The control is inside of a SimpleForm:

<sF:SimpleForm id="header" layout="ResponsiveGridLayout" editable="false">
    <sF:content>
	<MultiInput id="mailInput" value="{props>/mails}"></MultiInput>
    </sF:content>
</sF:SimpleForm>

How can we achieve this since the code in the example and in our solution is the same? The only difference is, is that our FES is on version 1.71

View Entire Topic
vinibar
Participant
0 Kudos

Hi, julianschmuckli. Your array should be bound to "tokens", not "value". More details here. Live sample here.

<MultiInput tokens="{model>/mails}">
    <tokens>
        <Token text="{model>mailText}" />
    </tokens>
</MultiInput>
julian-s
Participant
0 Kudos

Okay I have changed data binding a bit now with the aggregation, thanks for the tip. But unfortunately, I still get the same result with not displaying that one element with the text ellipsis like in the samples.

vinibar
Participant
0 Kudos

Probably your version is lower then 1.78.

sap.m.MultiComboBox, sap.m.MultiInput

When the sap.m.MultiComboBox and sap.m.MultiInput controls contain only one token with long text, the token is always displayed and the text is truncated depending on the screen width. Previously, the token was removed and in its place a text saying “1 item” was displayed, which was not very informative. For more information, see the sap.m.MultiComboBox and the sap.m.MultiInput samples.