Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

122
Views
check if input/value in b-form-selected

I have a b-form-select and when I choose one option I want to enable my button. But I don't know how to check if there is a value in my selection.

Thanks for helping me out !

<b-form-select v-model="data.Name" :value="data.Name"></b-form-select>

<b-button :disabled="!validDataAdded"></b-button>
computed: {
  validDataAdded: function(){
    return //Check here
  },
}
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

In order to answer that question first we need to make some things clear.
v-model uses the :value attribute under the hood as a way to communicate with the component and pass down values.
That been said you dont need to add a :value attribute to your select component. If you need to set a initial value you simply need to set an initial value to your v-model.

If you want to check if there is a value to your selection you just need to check if the v-model has a value. Remember that a v-model corresponds to a property (either part of data or computed section).

In you example you need to check if data.Name contains a value or not.
Check out this sandbox where I create an example for you according you code-snippet.

Last but not least the way that you have written your v-model it seems that you have an object called data inside your data property

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!