I have a non-editable table with Row actions like:
The data of the table is stored in localStorage by an mysql query global_sqlQuery_localStorageRefresh_keywordPcb.
SELECT * FROM eddy_db.keyword_pcb_view;
If I press the delete row action button a modal frame will pop up and you have to confirm a question. If you confim, a mysql query to set a delete flag in the current row will run.
UPDATE eddy_db.definition_keyword_pcb
SET
updatedById = {{ global_var_appUser_userId.value }},
updatedAt = CURRENT_TIMESTAMP,
deletedById = {{ global_var_appUser_userId.value }},
deletedAt = CURRENT_TIMESTAMP
WHERE
id = {{ keywordPage_table_keyword.selectedRow.id }}
If you press the regenerate row action button another mysql query will be run:
UPDATE eddy_db.definition_keyword_pcb
SET
updatedById = {{ global_var_appUser_userId.value }},
updatedAt = CURRENT_TIMESTAMP,
deletedById = null,
deletedAt = null
WHERE
id = {{ currentRowId }} ;
(here an additional scope is needed)
If I regenerate or dele, I call the refresh mysql query.
If I click the delete and regenerate button of some rows. In the most time everything is fine. But in some cases I see the following error "Cannot read properties of undefined" :
Try using the Debounce field and perhaps add some time like 1000 (1 second) to some of the queries so that they have time to complete before the refresh happens?
Would you mind sharing how did you set up your Delete and Regenerate event handlers?
Also, don't let yourself be deceived by the linting erros. This is a bug in retool where variables that are referring to additional scope will show up in the linting section in the console.
I have already played a little bit with the debouce value of 100. Now I checked 1 second at the delete confirm button and the regenerate button and on the refresh function. Nothing could help:
@MiguelOrtiz it is an option that my error is a linter error. I use a couple of times the currentRow of the table.
How can I check this is a linter error? If I reset the log, everything is cleared. Only a onclear number in brackets at linter tab is active. But the content is cleared, too.
If I reproduce this error my error list looks like: