Bug with renderUI when bookmarking: inputs created dynamically keep reverting back to the bookmarked value #2322
Labels
Feature: Bookmarking
Priority: High
Type: Regression
Functionality from a previous release no longer works
Milestone
This one took quite a while to isolate and find the issue 馃
Here's the simplest example I could think of. Using this shiny app:
The numeric input controls how many text inputs are shown. Every time you change the number, the text inputs are re-rendered, with the default value of "test". This is fine initially when you run the app unless the app is restored from a bookmark.
The problem:
Change any of the text fields, and bookmark the URL. Now load the app using this bookmarked URL. The app will correctly load into the last state. If you change the number however, the text inputs are now going to be initialized using the values that they had when you restored the app from the bookmark, instead of using the values that the server code is telling them to have.
This is most likely happening because of the call to
restoreInput()
inside the text input, which essentially makes the renderUI ignore the value that we pass and just go back to the bookmarked state.The text was updated successfully, but these errors were encountered: