Topic: MdSwitch does not support binding

Philip Keiter free asked 6 years ago


There is no way to set or get the value from the switch.

Philip Keiter free answered 6 years ago


You can fix by adding this to the input tag:
:checked="value" @change="$emit('input', $event.target.checked)"
And add this to the props:
value: {
    type: Boolean,
    default: false
},


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Vue
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags