How to add row/delete seleted row with javascript

hi I have a talbe in my page, and another three external buttons “add” “delete” “submit”

I want to add a new row in table, when “add” clicked
I want to delete selected row when “delete” clicked
I want to submit table data to a backend rest api when “submit” clicked

my js:

export default {
	addRow: () => {
		Table1.tableData.push({
			"username": "1",
			"name": "2",
			"email": "3"
		})
	},
	delRow: () => {
		Table1.tableData.slice(Table1.selectedRowIndex, 1)
	}
}

why does this not work at all, I am new to appsmith, please give me some hint.

1 Like

This has been answered in discord - Discord