Andrey Selitsky
Andrey Selitsky

Reputation: 2604

How to listen to both user edits and changes made in code for textfield in ExtJs4?

I know that I can add a listener to the change event, but it will fire only when user changes the value. Is there a way to setup a similar listener for programmatic change as well?

Upvotes: 3

Views: 675

Answers (2)

dbrin
dbrin

Reputation: 15673

if you use setValue() method that should fire your change event.

Upvotes: 4

user436939
user436939

Reputation:

You can fire event after programmatic changes.

cmp.fireEvent('change', cmp, newValue, oldValue)

Upvotes: 1

Related Questions