We do this by constructing a buffer of observed input values. Then, each time the server renders, we check to see if the next rendered value matches the first value in the buffer. If it does then we continue to display the last value in the buffer and shift the buffer array. If it doesn't then we clear the buffer array and display that rendered value.
* actually fix#684
Because we handle events asynchronously, we must leave the value
uncontrolled in order to allow all changed committed by the user to be
recorded in the order they occur. If we don't, the user may commit
multiple changes before we render resulting in prior changes being
overwritten by subsequent ones. Instead of controlling the value, we set
it in an effect. This feels a bit hacky, but I can't think of a better
way to work around this problem.
* update changelog
* set target value onchange client-side
This may not be a perfect solution. I worry that doing this may have unintended
consiquences. For example, what if someone wanted to have some sort of
auto-correct feature. Will setting the target value somehow overwrite
auto-corrections? From limited testing it seems to work fine, but that
testing was not extensive.
* changelog entry
* docs for components sharing state
* Add new line to end of file
* Update docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json
* Update docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json
* Update docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json
* Update docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json
* Update docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/app.py
* Update docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/app.py
* Update docs/source/adding-interactivity/components-sharing-state/_examples/filterable_list/data.json
* making syncedinputs an example, moving to managing-state
* fixing isort import issue in shared-component-state examples
* fixing link references
* fixing docker build by upgrading npm and fast-json-path
* Update noxfile.py
Co-authored-by: Alessio Civitillo <@acivitillo@dyvenia.com>
Co-authored-by: Ryan Morshead <ryan.morshead@gmail.com>
In short, because components do not have a node in the model state tree
managed by the layout, keys for elements in the components were being
registered to the parent of the component rather than to a node for
the component which contained the elements.
The short-term solution was to make it so components wrap their
contents in a div without a key. The long-term solution is to
refactor the Layout() and give components a dedicated node in the
model state tree