Trying to get the previous value of the combo box. I tried 'change' event, but it does not work. 'beforeselect' does not exist for the new extjs 4.0 if i am not wrong. Any ideas on how i can do this?
I understand we can use the change event, but that only happens when the user types something. I want to check if there is an previous value on each new select?
It's kind of weird that there is no beforeselect event. However, combobox extends picker and every picker has selectionModel with beforeselect event. So you may assign handler to picker selModel's beforeselect event:
MyCombo.getPicker().getSelectionModel()
.on('beforeselect',function(sm, selections, i) {
console.log(sm.lastSelected, selections, i);
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With