bootstrap-vue / bootstrap-vue

BootstrapVue provides one of the most comprehensive implementations of Bootstrap v4 for Vue.js. With extensive and automated WAI-ARIA accessibility markup.
https://bootstrap-vue.org
MIT License
14.52k stars 1.87k forks source link

Checkbox incorrectly displays state #6648

Open gmw-web opened 3 years ago

gmw-web commented 3 years ago

Describe the bug

When using a b-form-checkbox with the checked prop, the checkbox immediately renders it's state as checked when toggling, instead of reflecting it's state based on the checked property.

This is especially annoying when the 'check' action triggers an async action, which may fail. If this is the case the checked should not result in the switch being enabled. At the moment, it is, even when the checked prop val remains false throughout.

Steps to reproduce the bug

See codepen https://codepen.io/gmw-web/pen/bGqLXGM?editors=101.

Expected behavior

When using the checked property, I would expect the checkbox to reflect the value of this property at all times.

Versions

Libraries:

Environment:

Demo link

https://codepen.io/gmw-web/pen/bGqLXGM?editors=101

Additional context

none.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution.

gmw-web commented 2 years ago

Not stale, still relevant.

zhiga90 commented 2 years ago

Not stale, still relevant.

marcelo-rebello commented 1 year ago

Not stale, just forgotten :(