Hi There,
I face a issue when I use softupdate method to edit Textfield.
I use react@15.5.4 and material-ui@0.18.1.
I try to use softupdate to reset my state value, however, when I try to insert a word within old value. I only could add the first character and then the cursor just jumps to the end.
for example, if I want add "World" before string "University". what I got is "Wuniveristyorld". since after type "W", the cursor jumps to end of textfield.
initialState: () => ({streetNameNumber: ''})
in effects object
setTextValue: softUpdate((state, key, value) => ( {[key]: value })),
Hey @lxy305859844, I'm sorry I left this unattended for so long. Lots going on right now! Did you get this resolved? If not, would it be possible for you to provide a repro in the form of a gist or small repo?
Hi There, I face a issue when I use softupdate method to edit Textfield. I use react@15.5.4 and material-ui@0.18.1.
I try to use softupdate to reset my state value, however, when I try to insert a word within old value. I only could add the first character and then the cursor just jumps to the end.
for example, if I want add "World" before string "University". what I got is "Wuniveristyorld". since after type "W", the cursor jumps to end of textfield.
initialState: () => ({streetNameNumber: ''})
in effects object setTextValue: softUpdate((state, key, value) => ( {[key]: value })),
in render
<TextField floatingLabelText="Street Number/Name" name="streetNameNumber" id="streetNameNumber" value={state.streetNameNumber} onChange={e => effects.setTextValue(e.target.name, e.target.value)}/>
Anyone know what is going on?
very appreciate.