skr
skr

Reputation: 1811

How to add disabled property to a bootstrap button dynamically without using jquery

I have this button in bootstrap-vuejs

<b-button id="myBtn" variant="primary" @click="getLevel(searchData)" >Add</b-button>

I want to add disabled property dynamically based on a condition, how do i do it without jquery. I am not using jquery in my project.

<b-button id="myBtn" variant="primary" @click="getLevel(searchData)" diabled>Add</b-button>

Upvotes: 0

Views: 167

Answers (1)

skr
skr

Reputation: 1811

I figured it out, we can do it with the help of :disabled

<b-button
          id="myBtn"
          variant="primary"
          @click="getLevel(searchData)"
          :disabled="enableButton"
        >Add</b-button>

Upvotes: 1

Related Questions