React native picker default value #20163
Labels
Ran Commands
One of our bots successfully processed a command.
Resolution: Locked
This issue was locked by the bot.
I have picker that is supposed to make some editing on existing data as such:
This little piece of code
selectedValue={this.props.ID ? this.newData.get('shift') : this.props.store.EmpShift}
will indicate if there is a selected day, display it. if not whatever is selected, gets stored in a state calledEmpShift
.The problem I am facing is, the picker value does not change the display, whatever day I choose it reverts immediately back to
this.newData.get('shift').
I usually tackle these sorts of issues by changing
value
todefaultvalue
in inputs, but in this case there are no props fordefaultvalue
.How am I able to show the changes in regards with my existing data ? or show a one time
defaultvalue
on screen which I can change later and show.The text was updated successfully, but these errors were encountered: