Skip to content

How to use ...mapFields in script setup and typescript? #153

@ferrykranenburgcw

Description

@ferrykranenburgcw

We are currently in the proces of migrating some component to Vue 3 script setup style. But have have found some difficulties integrating this.

We are using a customHelper

export const customHelper = createHelpers({
  getterType: "getField",
  mutationType: "updateField"
});

And would like to use it inside a computed like this:

let somestate = computed(() =>customHelper.mapFields(["somestate"]);

It compiles, until we try to change the value.

somestate.value = "new value" <- this won't compile.

Is there anything we can do to make this work?

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