I am having a hard time reseting an inputs init value when it’s located in a collection and i refresh the collections data source
- my collection comes from xano and is a list of data without any text in the logo field
- i have an input in each cell of the collection and a button
- on button press, i send a request to xano to update that records logo field and refresh the collection of items without text in logo field
- the new collection items appear in the cells
seems like for the purpose of timesake, i can use a popup modal to do the editing of data and resetting of input after submission more cleanly but there must be a way to do what i am describing in the video.
To programmatically change/reset the input you need to bind the value to a variable and change the variable itself.
See here and here for some example.
this makes a lot of sense why direct manipulation doesnt work! thank you!
the input’s init value is bound to a value. i bind the input to a value from the collection, same as the text elements. are you suggesting it needs to be binded to an external (not the collection element) variable?
If is bound to the collection item it will be updated when refetching the collection. If it is bound to a variable it will be updated every time you change the variable (e.g. empty value to reset it, new arbitrary value ecc)
In both cases you act on the corresponding data in weweb with workflows.
it wasnt updating correctly via a collection refetch but it is working now via the variable bound method…weird