Table addRow() method?

Is a table's built-in "Show add row button" the only way to trigger a new row in a table?

I was looking to trigger a new row via an Event Handler, was kind of surprised there is no method available for that.

Perhaps a feature request!

ETA: Even cooler would be to be able to pass in some key/value pairs as an argument for pre-filling the new row, like table.addRow(column1: value, column2: value)

To clarify, I want to be able to accomplish what this button in the table toolbar does (it floats an empty, editable row above the table), but trigger it from anywhere, using an event handler / table method. Being able to pass in values to pre-fill would be even better.

Screen Shot 2022-05-25 at 4.44.33 PM

See this post

I reviewed that topic before posting, but I don't see how any of the info there would trigger a new row in a table the same way the native "+" button in the table's toolbar does?

Besides, new row data is collected in table.newRow, not table.recordUpdates which only reflects unsaved changes to existing records displayed in the table.

Hi @Schteevynn, There's no way to programmatically open the new row modal. That's an interesting idea though! Thanks for the suggestion :smile: Could you use a form component for your use case in the meantime?