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

feat(vue): maintain vue reactivity on forms and tables #9

Merged
merged 13 commits into from
Apr 21, 2024
Merged

Conversation

cafadev
Copy link
Contributor

@cafadev cafadev commented Apr 21, 2024

References

Description:

This PR add the feature to maintain reactivity when you're using reactivity functions from Vue. You need to specify the properties as the function returning the object.

<script lang="ts" setup>
const label = ref('Save')
const placeholder = ref('Type your name')
const url = ref('artists/')

const form = useForm({
  fields: () => ({
    name: {
      type: FieldType.text,
      label: 'First name',
      placeholder: placeholder.value,
    },
  }),
  settings: () => ({
    url: url.value,
  }),
  buttons: () => ({
    main: {
      label: label.value,
    },
    },
  }),
</script>

@cafadev cafadev merged commit 8166284 into beta Apr 21, 2024
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

Successfully merging this pull request may close these issues.

1 participant