8000 b-form-checkbox assign is not a function · Issue #7182 · bootstrap-vue/bootstrap-vue · GitHub
[go: up one dir, main page]

Skip to content
b-form-checkbox assign is not a function #7182
Open
@JavascriptMick

Description

@JavascriptMick

Describe the bug

in Vue 3 + vue-compat. When setting v-model on a b-form-checkbox component results in a runtime error when clicking the switch. Does not occur with a standard input field.

Steps to reproduce the bug

  1. use b-form-checkbox in a view or component
  2. set v-model to a boolean property
  3. click switch/checkbox
  4. Error

Screenshot 2023-11-03 at 12 29 29 pm

Expected behavior

No runtime Error.

Versions

Libraries:

  • BootstrapVue: 2.23.1
  • Bootstrap: 4.6.2
  • Vue: 3.3.7

Environment:

  • Device: Macbook Pro
  • OS: MacOS Sonoma 14.0
  • Browser: Chrome
  • Version: Version 118.0.5993.117 (Official Build) (arm64)

Demo link

minimal repro on stackblitz

https://stackblitz.com/edit/bootstrap-vue-with-compat-fsfglw?file=components%2FHelloBootstrap.vue

Additional context

in my application, this crashes UI with 'Uncaught runtime Errors'.. in the stackblitz demo, only logs error to console.

When I debug down into the vue.js code, it seems that this call...

const vModelCheckbox = {
...
const assign = el[assignKey]; //yields undefined
....
assign(getCheckboxValue(el, checked)); //assign is not a function as it is undefined (boom)

where: assignKey is Symbol(_assign), this yields undefined, creating the error later

It may be related to this (vuejs/core#4121)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0