Create new row in edit mode in JS

  • 2
  • Question
  • Updated 4 years ago
  • Answered
Is it possible to specify the model.createRow() call to create a new row in edit mode? I apologize if this has been posed elsewhere, I could not find something the exact same, only this post about making an edit button which I could not get to work in this situation.

I know how to do this using the create new row action in the UI, but was looking to do it in JS. Any ideas?

Thanks!
Photo of Craig Rosenbaum

Craig Rosenbaum

  • 4,776 Points 4k badge 2x thumb

Posted 4 years ago

  • 2
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
Looks like this wasn't in the documentation for Model.createRow(), but it is now:

skuid.model.Model API Documentation

model.createRow({
   editModeForNewItems: true
});
Photo of Craig Rosenbaum

Craig Rosenbaum

  • 4,776 Points 4k badge 2x thumb
Awesome, thanks!