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

value doesn't work with vModel #95

Open
Maxim-Mazurok opened this issue Jan 28, 2022 · 0 comments
Open

value doesn't work with vModel #95

Maxim-Mazurok opened this issue Jan 28, 2022 · 0 comments

Comments

@Maxim-Mazurok
Copy link
Contributor

Maxim-Mazurok commented Jan 28, 2022

I want to use my component like this:

<NewFolderDialog vModel={this.newFolderDialogIsActive} />

So I did this:

export default tsx.component({
  name: "NewFolderDialog",
  props: {
    value: {
      type: Boolean as PropType<boolean>,
      required: true,
    },
  },
  model: {
    prop: "value",
    event: "active",
  },
//...

But I'm getting No overload matches this call error:
Property 'value' is missing in type '{ vModel: boolean; }' but required in type '{ value: boolean; }'

It'd be great if I could use vModel with value prop in TSX. And even better if I could change the prop name using model.prop.

Workaround for me is to remove required from the value prop. Another workaround would be to "expand" vModel manually.

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

1 participant