sfxcode / formkit-primevue

PrimeVue (v4, v3) support for the FormKit validation Framwork
https://sfxcode.github.io/formkit-primevue
MIT License
104 stars 9 forks source link

FormKitSchema doesn't update data props #60

Open ironytr opened 4 days ago

ironytr commented 4 days ago
<script setup lang="ts">
import { FormKitSchema } from '@formkit/vue'

useHead({
  title: "Katalog Özellikleri",
})
const schemaGroup = reactive(
  [
    {
      $el: 'h2',
      children: ['Özellik Grubu Oluştur']
    },

    {
      $formkit: 'primeInputText',
      name: 'name',
      label: 'Özellik İsmi',
      help: 'Oluşturacağınız özellik için isim giriniz',
      validation: 'required'

    },
  ]
)

const attributeGroupForm = ref({})

</script>

<template>
  <div class="card">
    <FormKit type="form" id="form" v-model="attributeGroupForm" class="w-full" :submit-attrs="{
        inputClass: 'p-button p-component',
        wrapperClass: 'w-full',
        outerClass: 'w-full'
      }" @submit="">
      <pre>{{attributeGroupForm}}</pre>
        <FormKitSchema :schema="schemaGroup" :data="attributeGroupForm"/>
      </FormKit>
  </div>
</template>

no model capturing the input data image

sfxcode commented 3 days ago

Hi,

for me it looks like you don't use input elements from this framework but the default FormKit input elements.

Normaly i prefer not to mix ...

Hard to say what your problem is, maybe the default formkit inputs are not registered in your formkit config.

Greetings,

Tom

ironytr commented 3 days ago

Hi,

for me it looks like you don't use input elements from this framework but the default FormKit input elements.

Normaly i prefer not to mix ...

Hard to say what your problem is, maybe the default formkit inputs are not registered in your formkit config.

Greetings,

Tom

Oh, sorry my bad. I have updated first comment for sample code, prime inputs not working for schema too.

sfxcode commented 1 day ago

Hi,

can you provide a more complete demo on stackblitz ?

Hard to tell what goes wrong in your app. Maybe some configuration is missing. Are there console messages ?

Greetings,

Tom