Skip to main content

From the SKUID model.model page ( skuid.model.Model — Skuid v15.1.6 Documentation ) you can flag a row for deletion in javascript using the deleteRow function, but if you’re flagging many rows for deletion (several thousand) you need to loop over all of them and flag each of them which appears to run very slowly (I assume it also invokes a display update).


Like the updateRows function that allows you to pass many rows at once and only have a single display update, is there some sort of deleteRows function? There doesn’t appear to be. Is there another way to go about this that is more efficient than looping through the whole model and running deleteRow on each row?


Thanks!

Hello, Mark. Great question, and the answer is there absolutely is a deleteRows() API! Thanks for catching this, and we’ll be getting the docs updated to reflect this soon.


You also identified the biggest difference between the two APIs: deleteRow() triggers rerendering after each row, but deleteRows() waits for all the rows to process before triggering rerendering. Because of this, we actually prefer deleteRows() although deleteRow() is still hanging around for convenience and backwards compatibility. To call deleteRows(), the first argument is an array of row objects instead of just the single row object like in deleteRow(). Does that help?


Reply