html select - Vue 2.0.3 setting option value not working with :value="x" or v-bind:value="x" -


https://jsfiddle.net/53jprgse/

i'm not able dynamic select option value attributes set using vue 2.0.3 , :value or v-bind:value bindings. no option values being set when use these.

i have add static html value="" or value="some value" attribute option value attributes render dynamic values.

my data set simple array of strings.

this illustrated inspecting select elements @ fiddle above.

can tell me i'm missing here? seems should straight forward.

if want dom have value attribute set v-bind have add value attribute (doesn't matter says).

so, in first 2 selects had this:

<div>   <p>     :value="county"   </p>   <select v-model="filterbycounty">     <option value="">filter county...</option>     <option v-for="county in counties" :value="county">       {{ county }}     </option>   </select>   {{ selected_county }} </div> 

if add value <option> work you'd like:

<option v-for="county in counties" :value="county" value=""> 

Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -