How react assigns values to traversed text boxes

1. If you use defaultValue, then the value returned by the background is no longer refreshed, and if you use value plus onChange, you don"t know how to do the individual value.

Mar.10,2021

< input value= {value} onChange= {(value, index) = > this.handleChange {value, index}} >


finally modify the data in the traversal array according to the data in the traversal array. For example,
< input type= "text" onChange= {e = > this.inputChang (e, item)} value= {item.cartAmount} / >
my default reality here is a value in the data returned by background, as long as the item is passed to item.cartAmount=e.target.value;. You can change it to the value entered in the text box!


input directly use v-model


you can refer to the first

of the React-ElementUi form component.
// element-ui ,  setState
// 
onChange(key, value) {
  this.state.form[key] = value;
  // this.forceUpdate();
}

I hope I can help you

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5dc50-44233.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5dc50-44233.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?