You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two template refs available to the input.
What is expected?
While technically being correct, the code example from the playground is probably not what the (new) user intended.
New users will probably start using useTemplateRef and may fall into the trap of defining another ref with a name which is equal to the ref on the HTML Input element. This is confusing, and I think this usage was removed from the docs as well (not sure).
It would be better if the compiler would catch this case and issue a warning for last template ref, suggesting to rename/remove it.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Vue version
3.5.13
Link to minimal reproduction
https://play.vuejs.org/#eNp9kj1PwzAQhv/KyUtbqTQDTCVFAtQBBkClo5cqvRQXx7b8ESpF+e+cnbaEqsp2vvc557nIDXs0ZlYHZHOWu8IK48GhD+aBK1EZbT00EByusTJy43GF5RQsltBCaXUFIxod3XPFVaGV8yCUCZ4gWFxMjTlLGWcTwnswkXTfeMJVnnUC9Gk6+OMsnQDyrahT8a8EaJp0R9ses2yYI4+raCdCGouzJdQ3ld6i7HWyTuU4mGc9QzZl3tFSpdjN9k4r+ptNhDkrdGWERPtuvKClOZtDSmK2kVL/vKaetwGnp37xhcX3lf7eHWKPsw+LDm2NnJ0zv7E7JMsYLz/f8ED1OaRNgiR6IFyh0zJExw57CmpL2j0u2b6kNyHUbu2WB4/KnZaKopFsE88ZvYvngdX/dG9nd2mOq5a1v7t717o=
Steps to reproduce
There are two template refs available to the input.
What is expected?
While technically being correct, the code example from the playground is probably not what the (new) user intended.
New users will probably start using
useTemplateRef
and may fall into the trap of defining another ref with a name which is equal to the ref on the HTML Input element. This is confusing, and I think this usage was removed from the docs as well (not sure).It would be better if the compiler would catch this case and issue a warning for last template ref, suggesting to rename/remove it.
The text was updated successfully, but these errors were encountered: