Hi!
I am completely knew to Retool, with some basic JavaScript knowledge. So, here we go:
My goal: Create a button that automatically pastes generated titles from titlesContainer.value
into a cell in productDataTable
.
Issue: I can copy text to clipboard and display it in a simple input component, but I cannot programmatically paste it into a table cell.
Steps I've taken to troubleshoot:
-
First tried simple approach: Run query > (textInput1.setValue(titlesContainer.value)) works to display the value in a text input component, but when I try a similar approach to automatically insert the value in a table cell (e.g. productDataTable.data[0] ) it doesn´t work.
-
I then tried to simulate Cmd+V/Ctrl+V keyboard shortcut with some JavaScript since manual paste works when cursor is in cell. I couldn´t get this to work either.
-
I also looked into using table's
changesetArray
to simulate manual changes, but this too failed.
The only working solution is manual Cmd+V/Ctrl+V after placing cursor in the cell.
Additional info: Using Retool Cloud.
Anyone knows how to achieve this, or a UX friendly workaround? Basically I just want to programmatically paste titlesContainer.value
into a productDataTable
cell.
Thank you very much in advance!