PDA

View Full Version : 4.2 viewready fires before load



bobmanc
15 Mar 2013, 10:57 AM
This seems like a bug it worked the opposite way in 4.1 and the documentation says

viewready: Fires when the grid view is available (use this for selecting a default row).

You can't select a default row if the data hasn't loaded yet.

slemmon
15 Mar 2013, 2:09 PM
You could have a view configured with a store and the store is loaded with data. Or you could have a view configured with a store and the store is not yet loaded with data (synced / loaded manually). I'd think the view would fire/bubble the viewready event regardless of its store's load status. You'd just have to check once fired to see if the store is populated with records (or in the middle of loading, etc.) before taking action on its records.

bobmanc
15 Mar 2013, 4:35 PM
That is not what the documentation says. The only way to select a default row is if the event always fires after the load event.