cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5 1.26.4 DropdownBox Bug?

kostyah
Participant
0 Kudos

Dear Community and, probably, support Team,

one sunny morning one of my DropdownBox just stopped changing its value.

Expected behaviour:

1. click the dropdown

2. select different item

3. see that list is closed and the value has changed

4. "changed" even fires with the selected value

Bug behaviour:

1. click the dropdown

2. select different item

3. list closes, value has not been changed

4. "changed" event fires with the old value

+ whats more strange, I click the dropdown again and see only one item in the list.

No js errors in console

I use always-latest version of UI5 from SAP server, and it only happens in Chrome.

Just tested it on my HANA server UI5 (v 1.22.3) - works fine.

Normal look of the dropdown:

Broken look of the dropdown(after one selection):

View Entire Topic
kostyah
Participant
0 Kudos

a bit deeper exploration.

Just to play around I removed all CSS classes from dropdown div and it shows up as two separate HTML components: <input> and <select>.

and now... <select> changes, but the value in <input> is not.

SergioG_TX
Active Contributor
0 Kudos

are you still having an issue? can you provide some sample code you are using?

kostyah
Participant
0 Kudos

Hi Sergio,

issue is still up. Well, the code is quite complex, but its similar to my other Dropdowns.

I have designed a "parameter panel", which is a row of Dropdowns embedded in a HorizontalLayout. The code for the this exact Dropdown is:


var dropdownCategory = new sap.ui.commons.DropdownBox({tooltip: "Category" })

  .bindAggregation("items", "/content/category/entries", new sap.ui.core.ListItem({

       text: "{NAME}",

       key: "{CATEGORYID}"

  }))

  .bindProperty("selectedKey", "/settings/category")

  .attachChange(function(oEvent){ 

       newSettings = oEvent.getSource().getModel().getData().settings;

       oController.onParameterChange("dropdownCategory", oEvent, newSettings);

  })

  .setModel(this.model)

  .setEditable(this.config.category.editable);

  this.labelCategory = new sap.ui.commons.Label({text: "Category:", labelFor: dropdownCategory});

  this.dropdownCategory = dropdownCategory;

SergioG_TX
Active Contributor
0 Kudos

try moving the setModel to... dropDownCategory.setModel(this.model) after the creation of the drop down.. it is supposed to work as you have it but I have seen it not work on my implementation as well.  just separate the creation of the drop down and setting the model in 2 operations. that's should work then