Skip to Content

Combobox does not show all items

Hi, i have a combobox that load data from a json, i have 198 elements to show but only shows 100 items , how can i fix this the documentation specifics that if i have less than 200 elemts it's ok to use it

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    May 20 at 12:39 AM

    Hey Naoto,

    I just wrote an Blog article about this subject.

    100 Entities is the default limit of your model.

    If you want you can increase this limit. I would suggest the following way to do so:

    <ComboBox
      items="{
        path:'/Country', length:200}" >
      <items>
        <core:Item key="{CountryIsoCode}" text="{Text}" />
      </items>
    </ComboBox>

    Works also in Java-Script:

    var oControl= this.getView().byId("controlName");
    oControl.bindItems({
    	path:"/Country",
            length: 200,
    	template: new sap.ui.core.Item({key:"{CountryIsoCode}",text:"{Text}"})
    });

    The other way is to change sizelimit of your model by using the function setSizeLimit like this:

    ...
    oModel.setSizeLimit(200);
    ...

    Also if you're interested see my whole article here

    Greetings,
    Sebastian

    Add comment
    10|10000 characters needed characters exceeded

  • May 19 at 07:23 PM

    i believe that is the default behavior (100 records), see if you can implement the lazy loading feature as shown here:

    https://sapui5.hana.ondemand.com/#/entity/sap.m.ComboBox

    Add comment
    10|10000 characters needed characters exceeded