Skip to content

Commit defbec0

Browse files
authored
chore(docs): update modal prevent closing example (bootstrap-vue#4605)
1 parent c8b5ba3 commit defbec0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/modal/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ To prevent `<b-modal>` from closing (for example when validation fails). you can
285285
methods: {
286286
checkFormValidity() {
287287
const valid = this.$refs.form.checkValidity()
288-
this.nameState = valid ? 'valid' : 'invalid'
288+
this.nameState = valid
289289
return valid
290290
},
291291
resetModal() {
@@ -307,7 +307,7 @@ To prevent `<b-modal>` from closing (for example when validation fails). you can
307307
this.submittedNames.push(this.name)
308308
// Hide the modal manually
309309
this.$nextTick(() => {
310-
this.$refs.modal.hide()
310+
this.$bvModal.hide('modal-prevent-closing')
311311
})
312312
}
313313
}

0 commit comments

Comments
 (0)