Next.js Discord

Discord Forum

Adding new rows in table from website.

Answered
Sloth bear posted this in #help-forum
Open in Discord
Sloth bearOP
Does anyone know how to add rows for a table from the actual website. I can't find any information at all on this. Every google or youtube thing I search is only people showing you how to setup the tables and do pagination and stuff lke that.
Answered by Anay-208
users.push() after asking all the info
View full answer

16 Replies

@Anay-208 Sorry, I didn’t quite get you, can you try again?
Sloth bearOP
Yes, thanks for responding. On the next js website it has a add new button for the table, and that's what I want to do but there is no information on it anywhere. I was asking if anyone knew how do it or could point me in the right direction.
@Anay-208 If you see at the top, there is a button for code
Sloth bearOP
Yes but the button does nothing
let me see
Are you referring to add new button @Sloth bear
@Sloth bear Yes
nextui expects you to manually add a onClick function, and ask the user for details, and add that. It won't provide you code for all
Sloth bearOP
I know about the normal insertRow() on html but I cant find anything for this
Original message was deleted
users.push() after asking all the info
Answer
@Anay-208 `users.push()` after asking all the info
Sloth bearOP
no way it was this easy 🤦‍♂️
thanks man sorry for the hassle
... I understand, It took me a few mins to find this out
@Anay-208 `users.push()` after asking all the info
can you mark my answer as a solution?