question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The update:model-value event of q-check-box can not be triggered when v-model changed

See original GitHub issue

Describe the bug The update:model-value event of q-check-box can not be triggered when v-model changed. But it can be triggered by clicking.

Codepen/jsFiddle/Codesandbox (required) https://codepen.io/zouyaoji/pen/xxLpZqp?editors=101

To Reproduce Steps to reproduce the behavior:

  1. Go to https://codepen.io/zouyaoji/pen/xxLpZqp?editors=101
  2. Open the browser console.
  3. See error
// Can not trigger this callback
const updated = (e) => {
   console.log(e)
}

Expected behavior The update:model-value event of q-check-box can be triggered when v-model changed.

Screenshots If applicable, add screenshots to help explain your problem.

Platform (please complete the following information): Quasar Version: @quasar/app Version:

Quasar mode:

  • SPA
  • SSR
  • PWA
  • Electron
  • Cordova
  • Capacitor
  • BEX

Tested on:

  • SPA
  • SSR
  • PWA
  • Electron
  • Cordova
  • Capacitor
  • BEX

OS: Windows 10 Node: 14 NPM: 7 Browsers: Chrome and Firefox latest

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
zouyaojicommented, Nov 3, 2021

Thank you, I’ve now understood.

0reactions
ryhncommented, Oct 27, 2022

You can use watch in the parent if you want to be notified on model change I know that.

Actually i didn’t need this before so i thought the model change would work. Anyway thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

v-model does not update value when external input/change ...
A checkbox input with v-model does not update the value when an "input" or "change" event was triggered externally, whereas this does work ......
Read more >
Angular How to trigger change event of checkbox after model ...
You cannot call event from another checkbox. You can only call method from another methods constructor(){} someEvent(event){ this.
Read more >
Ion-checkbox @update:modelValue triggered when bound
I think saw this issue raised somewhere but I can't find it again and I'm hoping for a workaround. I have two pages...
Read more >
Form Input | Components - BootstrapVue
The custom update event is passed the input value, and is emitted whenever the v-model needs updating (it is emitted before input ,...
Read more >
Form Input Bindings - Vue.js
It can be cumbersome to manually wire up value bindings and change event listeners: ... <input type="checkbox" id="checkbox" v-model="checked" /> <label ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found