b-form-checkbox has internal state for whether or not it is checked. It does get synced with the prop but it's via a watch so it'll only update when the prop value changes. In your case you're trying to prevent it changing, so the watch won't trigger.
You may want to consider disabling the checkbox instead.
To get this to work without disabling the checkbox you'd need to ensure the checkbox's watch gets triggered. For that we need to let the original change happen, allow it to update the prop, then change it back to the value we want.
The example below uses async/await but you could do it using a callback passed to $nextTick if you prefer.
new Vue({
el: '#app',
data () {
return {
isSelected: false
}
},
methods: {
async onInput () {
await this.$nextTick()
this.isSelected = false
}
}
})
<link type="text/css" rel="stylesheet" href="https://unpkg.com/[email protected]/dist/css/bootstrap.css" />
<link type="text/css" rel="stylesheet" href="https://unpkg.com/[email protected]/dist/bootstrap-vue.css" />
<script src="https://unpkg.com/[email protected]/dist/vue.js"></script>
<script src="https://unpkg.com/[email protected]/dist/bootstrap-vue.js"></script>
<div id="app">
<b-form-checkbox v-model="isSelected" @input="onInput"></b-form-checkbox>
</div>
I've used the input event but change would work too.