question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

onChange with b-form-select

See original GitHub issue

I have a button that I need to disable every time a new value is passed with b-form-select

So i’m trying to run a function that disables the button by setting a data object to false, however it does not work with b-form-select.

This does not work

<b-form-select v-model="selectName"
             @change="myFunc()" 
             :options="selectNameOptions"
            size="lg"
            class="mb-3">
</b-form-select>

This works

<select v-model="selectName" @change="myFunc()">
<option disabled value="">Please select one</option>
<option>A</option>
<option>B</option>
<option>C</option>
</select>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
tmorehousecommented, Sep 28, 2017

You shouldn’t place parens on your function when passing it to @change. use @change="tt" in stead of @change="tt()"

3reactions
ottz0commented, Sep 28, 2017

I have just seen issue #660

I have updated my code to which seems to work

<b-form-select v-model="selectName"
 @change.native="tt()" 
:options="selectNameOptions"
size="lg"
 class="mb-3">
</b-form-select>
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get selected item of b-form-select with Vue.js. v-on ...
I just want to get the selected item of the <b-form-select> which I want to use for an api call. It looks like...
Read more >
Form Select | Components - BootstrapVue
In non multiple mode, <b-form-select> returns the a single value of the currently selected option. Please select some item, This is First option,...
Read more >
How to pass value from a change event to a function? - Get Help
Here's the problem, i have a b-form-select with a @change calling a function, this function should get the value of the b-form-select and ......
Read more >
How to Use @change in Vue with select Tags - Mastering JS
If you want to avoid having to use v-model with your <select> tags, you can use Vue's v-on:change directive, or just the shorthand...
Read more >
B- form- input change event - Weebly
In addition, we have the b-form-select component to show the items that can be ... The add-on-change accessory in the b-form-tags component will...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found