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

Using v-model on <input> in client-oriented render function in SSR doesn't work if type attribute is dynamic #5786

catrope opened this issue Apr 22, 2022 · 0 comments · Fixed by #5787
feat: ssr 🐞 bug Something isn't working


Copy link

catrope commented Apr 22, 2022



Reproduction link

Steps to reproduce

  1. In a component template, use an <input> that has a dynamic type attribute and uses v-model: <input :type="foo" v-model="bar">
  2. Compile this component to a client-oriented render function
  3. Use this compiled component in an SSR app, passing in { foo: 'text', bar: 'hello' }

What is expected?

The input should render as <input type="text" value="hello">

What is actually happening?

The input renders without a value: <input type="text">

This happens because vModelDynamic in src/directives/vModel.ts doesn't have an SSR equivalent, even though it would be possible to implement one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
feat: ssr 🐞 bug Something isn't working
None yet

Successfully merging a pull request may close this issue.

2 participants