Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clear all records from a store

I have a store, I am loading records from it successfully. Now i need to clear all the records in it. How can i do this ?

myStore.remove(); // DID NOT WORK
myStore.clear(); // ENDED UP WITH AN ERROR TypeError: myStore.clear is not a function

How could i solve this?

like image 444
Illep Avatar asked Jul 29 '12 07:07

Illep


1 Answers

Remove will remove the records you pass in. You want removeAll as in myStore.removeAll();

like image 71
David Kanarek Avatar answered Oct 20 '22 20:10

David Kanarek