I want to know how I can refresh my table after pressing the "Add line" button on a field. I need to see the newly added items in the table immediately. Can someone provide an example or tutorial on how to do this?
To refresh a table after adding a new line, you will need to manually rerun the query on success of the insert query. This can be achieved by adding the line fetch_data_query.run() at the end of the function being run onClick of the Add line button. This will fetch the updated data and refresh the table to display the new item in the line. There are no complex codes or tutorials needed as this is a simple solution.