on 01-20-2023 8:58 AM
I have a ComboBox. I have written a function for its change event, on a particular condition I need to clear the ComboBox selection and its value.
<ComboBox change="onChange"/>
onChange:function(oEvent){
if(someCondition is true){
oEvent.getSource().setValue("") // this trigger the onChange method again
//or
oEvent.getSource().clearSelection() // this does not clear the value
}
}
The above solutions have issue mentioned in comment.
Any solution for this ? Or de we have any event which will trigger on ComboBox popup close ?
comboBox.setSelectedKeys()
comboBox.setSelectedItems()
Both does not trigger the change event for me
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You´re right, i was at a multicombobox
But i tried here with a comboBox and the Change Event did not trigger:
https://ui5.sap.com/1.84.31/#/entity/sap.m.ComboBox/sample/sap.m.sample.ComboBox
Same with 1.108
Strangely, it triggered second time for me, when using inside change event. But version 1.71.
User | Count |
---|---|
77 | |
11 | |
10 | |
8 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.