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

Forms: getFieldState is not a function #7295

Closed
4 tasks
raizdev opened this issue Feb 21, 2025 · 1 comment
Closed
4 tasks

Forms: getFieldState is not a function #7295

raizdev opened this issue Feb 21, 2025 · 1 comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@raizdev
Copy link

raizdev commented Feb 21, 2025

Describe the bug

BaseEditableHolder.vue:122 Uncaught (in promise) TypeError: _this$$pcForm6.getFieldState is not a function
at Proxy.$formValue (BaseEditableHolder.vue:122:86)
at refreshComputed (reactivity.esm-bundler.js:380:28)
at get value (reactivity.esm-bundler.js:1631:5)
at Object.get [as $formValue] (runtime-core.esm-bundler.js:3527:22)
at Object.get (runtime-core.esm-bundler.js:3114:14)
at getter (runtime-core.esm-bundler.js:3636:78)
at callWithErrorHandling (runtime-core.esm-bundler.js:199:33)
at callWithAsyncErrorHandling (runtime-core.esm-bundler.js:206:17)
at baseWatchOptions.call (runtime-core.esm-bundler.js:6193:47)
at ReactiveEffect.getter [as fn] (reactivity.esm-bundler.js:1750:29)

<template>
    <template v-if="selectedAuthMethod !== 'external'">
        <div class="h-[200px]">
            <h2 class="mb-[50px]">Inloggen</h2>


            <Button label="Inloggen met Microsoft Azure" icon="pi pi-microsoft" severity="primary" class="w-full" @click="OAuthButton" outlined color="primary" />

            <Divider align="center" class="my-12">
                <span class="text-surface-600 dark:text-surface-200 font-normal text-sm">OF</span>
            </Divider>

            <Button label="Externen" icon="pi pi-user" severity="secondary" class="w-full" @click="selectedAuthMethod = 'external'" outlined color="primary" />
        </div>
    </template>

    <template v-else>
        <div>
            <h2>Inloggen voor externen</h2>

            <DynamicForm :fields @submit="onFormSubmit('Form 2', $event)" />

            <Divider align="center" class="my-12">
                <span class="text-surface-600 dark:text-surface-200 font-normal text-sm">OF</span>
            </Divider>

            <Button label="Inloggen" severity="secondary" class="w-full" @click="selectedAuthMethod = 'oauth'"></Button>
            
        </div>
    </template>
</template>

<script setup>
import { useAuthStore } from '@/stores'
import { useRouter } from 'vue-router';
import z from 'zod'

import DynamicForm from '@/components/ui/form/DynamicForm.vue'

definePage({
    name: 'login',
    meta: {
        middleware: 'guest',
        layout: 'AuthLayout'
    }
});

const { authWithOAuth, authWithCredentials } = useAuthStore();
const router = useRouter();

const selectedAuthMethod = ref('oauth')

const fields = reactive({
    email: { name: 'email', label: 'Email', schema: z.string().email() },
    password: { label: 'Wachtwoord', as: 'Password', feedback: false, schema: z.string().min(6), fluid: true }
})


const OAuthButton = async (provider) => {
    await authWithOAuth(provider) && router.push({ name: 'dashboard' });
}

const submitWithCredentials = async ({ values }) => {
    await authWithCredentials(values.email, values.password)
}
</script>

Pull Request Link

No response

Reason for not contributing a PR

  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other

Other Reason

No response

Reproducer

Environment

4.3.0-rc.1

Vue version

3.4

PrimeVue version

4.3.0-rc.1

Node version

No response

Browser(s)

No response

Steps to reproduce the behavior

Expected behavior

@raizdev raizdev added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 21, 2025
@raizdev raizdev closed this as completed Feb 21, 2025
@raizdev
Copy link
Author

raizdev commented Feb 21, 2025

Forgot to update 4.3.0-rc.1 forms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

1 participant