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

multiline v-model expressions #1218

Closed
geecu opened this issue May 21, 2020 · 2 comments · Fixed by #1234
Closed

multiline v-model expressions #1218

geecu opened this issue May 21, 2020 · 2 comments · Fixed by #1234

Comments

@geecu
Copy link

geecu commented May 21, 2020

Version

3.0.0-beta.14

Reproduction link

https://jsbin.com/jalezex/edit?html,output

Steps to reproduce

Check the console.

What is expected?

To work

What is actually happening?

It throws

[Vue warn]: Template compilation error: v-model value must be a valid JavaScript member expression.
1  |  <input v-model="
   |                  ^
2  |  model
   |  ^^^^^
3  |  ">{{model}} 
  at <App>

Prettier breaks long/deeply nested expressions for models, as mentioned here: prettier/prettier#5384

<my-input
  v-model="
    some.very.long[dynamic]expression
  "
>

The same issue for Vue 2 (vuejs/vue#9183) has been fixed in Vue 2.5.21 by vuejs/vue#9184.

geecu pushed a commit to geecu/vue-next that referenced this issue May 21, 2020
prettier breaks long/deeply nested expression attributes in new lines
(prettier/prettier#5384) but this breaks the
compiler
@takhello
Copy link

ueCompilerError: v-model value must be a valid JavaScript member expression.

v-model="getColumn(rowIndex, index)._filterVisible"

@Kingbultsea
Copy link
Contributor

ueCompilerError: v-model value must be a valid JavaScript member expression.

v-model="getColumn(rowIndex, index)._filterVisible"

you can use @change and :value

@github-actions github-actions bot locked and limited conversation to collaborators Oct 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants