Bootstrap-vue: Spinner in a button ?

Created on 4 Jun 2019  路  1Comment  路  Source: bootstrap-vue/bootstrap-vue

Spinner in a button

I do not understand how to hide the Spinner in the button and display it only at the moment of the click then make it disappear as soon as the action is over ...

Thank you for your clarification / example?

<button class="btn btn-success">
<b-spinner small type="grow" style="margin-bottom: 3px;"></b-spinner> Save
</button>
Answered Question

Most helpful comment

Use `v-if" to show and hide the spinner, based on a condition in your app/component. Such as setting a variable to true in a button click handler (then possibly disabling the button to prevent more clicks), and then once your async action is complete, reset the variable.

```html

>All comments

Use `v-if" to show and hide the spinner, based on a condition in your app/component. Such as setting a variable to true in a button click handler (then possibly disabling the button to prevent more clicks), and then once your async action is complete, reset the variable.

```html

Was this page helpful?
0 / 5 - 0 ratings

Related issues

meyt picture meyt  路  3Comments

developius picture developius  路  3Comments

chris-canipe picture chris-canipe  路  3Comments

m1neral picture m1neral  路  3Comments

chaymag picture chaymag  路  3Comments