yewstack / yew

Rust / Wasm framework for creating reliable and efficient web applications
https://yew.rs
Apache License 2.0
30.52k stars 1.42k forks source link

Input element not reflecting changed value #449

Closed kellytk closed 4 years ago

kellytk commented 5 years ago

Description

I'm submitting a ...

For a value entered into a text input and modified in the update method, Yew fails to reflect the modified value in the text input.

Expected Results

I made a simple demo of the issue in https://github.com/kellytk/inputdemo/ and it can be downloaded and ran with cargo web start.

Type a few characters into the input, "https://" is automatically prepended, delete a few characters including the right-most "/". The deleted "/" should be restored automatically.

Actual Results

https://github.com/kellytk/inputdemo/blob/master/src/app/mod.rs#L62 causes "https:/" to be replaced with "https://" which is reflected in https://github.com/kellytk/inputdemo/blob/master/src/app/mod.rs#L100 but not the input.

Context (Environment)

kellytk commented 5 years ago

This issue may be the same as experienced in https://github.com/DenisKolodin/yew/issues/233.

jstarry commented 4 years ago

Closed as duplicate to #233