Skip to Content
0
Jan 20, 2023 at 08:58 AM

How to clear ComboBox value on its "Change" event

241 Views

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 ?