Is it possible to add value to the file input via javascript?

  • Goal: I want to try to assign files to file input component in retool

  • Steps: Already try the solution here Remove specific index element from listView - #7 by david.mays which actually already working for input type text but not for file input.

  • Details: I want to create a listview consist of 1 text and 1 file input, also 1 button to add new row and 1 button in every row in listview. The behaviour is let's say have 2 rows in list view. When I delete the 1st row, the data in 2nd row will become the 1st one.

  • Screenshots:

The problem here is how to set the value of 1st row using 2nd data if the 1st row is deleted for the file input one, thank you