PDA

View Full Version : [Q] How to delay selectionchange events



cjessing
31 Oct 2014, 4:50 AM
Hi gurus

ExtJS 4.2.2

I have a grid panel and a form panel. selectionchange in the grid triggers the load of a form in the form panel. I would like for the user to be able to scroll up and down in the grid and only when the user settles on a grid row the form is loaded. At the moment the form is loaded on every selectionchange.

I have tried something like this:


'[xtype=shop.categoryTree]': { selectionchange: { fn: this.onCategorySelectionChange, delay: 3000 }}

but it doesn't make any difference.

Is there any way to delay the event a number of milliseconds?

Thanks in advance

evant
2 Nov 2014, 7:34 PM
Delay just means defer the execution, the event will still always fire. You want the "buffer" option.

cjessing
2 Nov 2014, 9:10 PM
You want the "buffer" option.

Got it!