openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

sap.m.MultiComboBox only renders first 100 items

Open grahamrobbo opened this issue 7 years ago • 1 comments

OpenUI5 version: 1.71.2

Browser/version (+device/version): Chrome V77, Safari V13, MS Edge, etc.

Any other tested browsers/devices(OK/FAIL):

URL (minimal example if possible): https://jsbin.com/rofebo/edit?html,js,output

Steps to reproduce the problem:

  1. Bind MultiComboBox to model with > 100 values
  2. Only first 100 values rendered.

What is the expected result? All values should be rendered - as per control documentation which says.. image

What happens instead? Only first 100 values rendered.

Any other information? (attach screenshot if possible) multicombo

grahamrobbo avatar Nov 03 '19 01:11 grahamrobbo

This is a duplicate of #927 .

By default, list bindings limit the amount of fetched data to 100 items. Controls that implement paging or growing don't have that limit.

You can change the default with a call to Model#setSizeLimit

var oModel = new sap.ui.model.json.JSONModel({
  "ComboItems" : comboItems
});
oModel.setSizeLimit(400);
oView.setModel(oModel);
oView.placeAt('content');

but you should be aware that non-paging controls will create the same amount of items as there's data in the model collection. If several thousands of items are created, this might already slow down the app significantly (depending on browser and memory, e.g. on mobile devices). In such scenarios you should rather use one of the paging controls.

I'm closing this as a duplicate.

codeworrior avatar Nov 03 '19 09:11 codeworrior