Openui5: sap.m.ComboBox only shows 100 items

Created on 30 Mar 2016  路  8Comments  路  Source: SAP/openui5

OpenUI5 version: 1.24.2

Steps to reproduce the problem:

  1. put a sap.m.ComboBox or sap.m.Select on the page
  2. bind it to a model with over 100 items
  3. it only shows the first 100 items, you can't input text to search, the items after 100 are just cut off.

What is the expected result?
it should display all items.
testcombobox_and_combobox-dbg_js_ _view_designer_code_change

consulting documentation

Most helpful comment

I have second thought, I think it's still a bug. Think about it, table and list won't have this problem when user scrolling down. As a developer, I would expect comboBox and Select to show more entries when it reaches the bottom of the its list. Even if it should a setting, then it should be a setting of the UI element, I wouldn't think it has anything to do with the model. It doesn't make sense to adjust a global setting on a model just for one UI element. I don't know the implementation details. It's either a bug or design issue.

All 8 comments

it's due to the default size limit of model. you can use oModel.setSizeLimit(500) to get a bigger limit, then all the items can be shown.

Hi,
thanks for finding and posting the solution yourself. However, this size limit is barely documented, and that is clearly an issue with documentation, which needs to be fixed. I opened internal ticket 1670198756 to finally get it documented a bit more visibly.
Of course this will not guarantee that everyone will notice, but at least everyone will have the _chance_ to know.

Regards
Andreas

I have second thought, I think it's still a bug. Think about it, table and list won't have this problem when user scrolling down. As a developer, I would expect comboBox and Select to show more entries when it reaches the bottom of the its list. Even if it should a setting, then it should be a setting of the UI element, I wouldn't think it has anything to do with the model. It doesn't make sense to adjust a global setting on a model just for one UI element. I don't know the implementation details. It's either a bug or design issue.

Hi,

no it is not a bug. Controls like table and list support paging and directly ask the list binding for the needed data e.g. when scrolling down. Other controls might not support this. In this case the size limit of the model is used.

This is a real world problem, cf. eg current Cloud Connector Release Note Preview at https://help.sap.com/viewer/cafc710a2446438abafad188be02bb59/Cloud/en-US/aac88506895849d4bc527a0f3adb3326.html "The limitation that only 100 subaccounts could be managed with the administration UI has been removed." the subaccounts are selected with a Select....

when binding with odata model, it only shows 100 items. BUT, size limit won't work...

Whats the solution to this ? I am having issues with showing more than 100. If I set the sizeLimit to more than 100 the app slows down like hell. To add on to that, it's a fiori element app :(

Now we have 2021 is there any solution?
Would it be possible to have at least a solution mentioned here?

Issue is:
ComboBox (in my case a MultiComboBox) bound to OData with more than 100 entries.
Typing something will filter on frontend only (so it will never show some potentially matching entries after the first 100).
Also search is "startswith" commonly I need a "contains".

So if the ticket is closed, I assume there is a way to work around?
How does this look like?

Also I misse the liveChange event where I could update the binding myself.

All in all this control is not usable.

Was this page helpful?
0 / 5 - 0 ratings