Fire clear event when Store is empty? - Ext JS

Just a suggestion and maybe this doesn't make sense in all cases. But I think it would be useful to fire the clear event on a data store if you remove all the records.

Ie I have 3 records in my store and call remove on all 3.

I think this may clean up code like the following:
ds.on('remove', function() {
	if (!ds.getCount())
		tbDeleteFindingBtn.disable();
});
Seems to me that the clear event should signify that all records have been removed and not be so tightly bound to the removeAll function.
  # 2  
02-22-2007, 06:39 PM

The clear event is specifically for when you clear the data store (to avoid numerous delete events). Firing the event delete + clear, would kind of defeat the purpose -> causing 2 grid, view (or other component) renders.

你可能感兴趣的:(ext,IE,UP)