Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update:modelValue not triggered when modelValue is an object #12430

Closed
jonas-eiselt-fk opened this issue Nov 18, 2024 · 2 comments
Closed

update:modelValue not triggered when modelValue is an object #12430

jonas-eiselt-fk opened this issue Nov 18, 2024 · 2 comments

Comments

@jonas-eiselt-fk
Copy link

jonas-eiselt-fk commented Nov 18, 2024

Vue version

3.5.13

Link to minimal reproduction

https://play.vuejs.org/#eNqFU01v1DAQ/SsjX9pVtwlo4bJkKz7UA0gUBIWTJRSSSXBxbOOPsFKU/87YISFI2/YWz5s3eW/8PLBXxmR9QLZnhausMB4c+mCuuBKd0dbDABYbGKGxuoMzaj1boDe6M1OdsyyPpziKM664qrRyHjpdo4RDHHE+QCOs8zdlh3sicLYFWa7PMG5mXqWD8mj/Mp9sXsSRTVCVF1qBVu/j3C+mLj2eb2DgCmZK1pcy4MUFMUauinwyRXbo4LEzkih0AijM1a3o0MHLkObsk9bLRAdvRduixXoPw7CoGccij5tJ5CQhwZPJFVjFvaznHThLJ/J44m+E/ueIunIaVOQrvWzLvKPdNKLN7pxWdF/JNWfxZ0Ki/WDibhxnpCkiESul1L/fpZq3AbdzvfqB1c8T9Tt3jDXOPlp0aHuSsmC+tC36Cb7+fINH+l5AchMkdT8AfkKnZYgap7bXQdUke9WX1L5N0RKqvXXXR4/Kzaai0Ng5pn7OKGkxcfdZ/yd3lz1LPAoEbXFO6YnAryL7NaXgADU2QmG6G8qvxV9BpFBEMRRXCtlDCRPKBA/9ZRo5ZyCNzpankC67+G4fZcxv5Z50fOvRxl2Rr132PHu6Y+MfMHFQgw==

Steps to reproduce

  1. Open provided Playground example
  2. Enter "foo" in first field
  3. The counter doesn't update because update:modelValue hasn't been triggered (see image below)
    image

What is expected?

  1. Open another Playground example:
    https://play.vuejs.org/#eNp9Ustu3DAM/BVCl91FErtt2svWCfpADi3QB9q0JwHFwqZdpbak6uEsYPjfQ8rxxgE2uZkccjxDzSDeW5v1EcVWFL50ygbwGKK9lFp11rgAAzisYYTamQ5WNLo6QB9NZ6e+FFnOFVNJIbXUpdE+QGcqbOGCKdarZrWZ+6WJOqC7R15s3vJKHXUZlNFg9Bfe+2WrXcA1bmCQGuadrN+1EU9OaAUm/qlDXEi9Ueoin5yQByoCdrYlHqoACnt5rTr08C4m8m0iOJsIglNNgw6rLQzDQeI4FjmfIy0nXQmenC3Ako+x5LuQIlVSHPsboY9s0lROREW+0CtORfB0sFo12Y03mh4pXUIK/plq0X2zfDAvBWlihLFd25rbz6kXXMTTuV/+xfLfkf6N33NPiu8OPbqepBywsHMNhgm++vkV9/R9AMlNbGn6GfAHetNG1jiNfYi6ItmLuaT2U8qT0s21v9oH1H42xUJ5ckzzUlC8OGZPWX+Qe569TnsUCLriHM0jKV/k9Pd9jCqslcb0NmtO//+oUihYDIyc1ecSprSNAfqzRDlnIFE/8cR/enRsmMSdZ2+yl6/EeAcYozhr
  2. Enter "foo" in example's only field
  3. The counter updates! update:modelValue has been triggered
    image

What is actually happening?

I don't know... the non-working example uses an object as the model-value whereas the working example uses a string as the model-value.

System Info

No response

Any additional comments?

No response

@jacekkarczmarczyk
Copy link
Contributor

Please check existing issues
https://github.com/vuejs/core/issues?q=is%3Aissue+defineModel+object+is%3Aclosed

@edison1105
Copy link
Member

duplicate of #12261
see #12261 (comment)

@edison1105 edison1105 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants