Saving Form Data | vue save data
Okaythanks.Ikindoffiguredthat’swhatI’dhavetodo-butIhadhopedtherewouldbeaneasieralternative(-toemittingupwards)So,justsoIunderstand-Ihaveaselectcontrolonacomponent.I’mproppingadatavaluedowntothiscomponentfromtheroot.Let’ssaythevalueis‘Internal’.Ialsohaveasetofdatatopopulatethelookup:statuses:[{text:,value:0},{text:Internal,value:1},{text:Informational,value:2},{text:InProgress,value:3},{text:InProgress-Reconvene,value:4},{text:Restored,value:5},{text:Restored-Reconvene,value:6},{text:Closed,v...
Okay thanks. I kind of figured that’s what I’d have to do - but I had hoped there would be an easier alternative ( - to emitting upwards)
So, just so I understand -
I have a select control on a component. I’m propping a data value down to this component from the root. Let’s say the value is ‘Internal’. I also have a set of data to populate the lookup:
statuses: [ {text:,value:0}, {text:Internal,value:1}, {text:Informational,value:2}, {text:In Progress,value:3}, {text:In Progress-Reconvene,value:4}, {text:Restored,value:5}, {text:Restored-Reconvene,value:6}, {text:Closed,value:7} ],I initially set up my template like so:headerData is the prop from the root.
<select v-model="headerData.Status" id="selStatus"> + <option v-for="status in statuses" :value="status.value">{{status.text}}</option> + </select>But the documentation seems to suggest I do it this way:
<select v-model="selected" o...