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:
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.
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(); });

#2
![]() |
![]() 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.
![]() |