PDA

View Full Version : filterUpdate event called multiple times on dateFilter



kguha
8 Mar 2011, 9:56 AM
I am using a GridFilter an inside that, a DateFilter. I see in DateFilter.js, the 'filterUpdate' event is fired when one of these two events are fired:
'onCheckChange'
'onMenuSelect'

But when a date is picked and the filter was not active previously, this will result in calling the 'filterUpdate' event three times.
#1. Internally because the state of the filter changed
#2. 'onCheckChange' --> ''filterUpdate"
#3. ''onMenuSelect' --> ''filterUpdate"

In my 'filterUpdate', I load the store by Ajax request, so this results in extra ajax calls.
Kindly advise.