Skip to content

value doesn't work with vModel #95

@Maxim-Mazurok

Description

@Maxim-Mazurok

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions