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

How to integrate v-text-field instead of input element? #12

Open
reisenmachtfreude opened this issue Jul 3, 2021 · 1 comment
Open

Comments

@reisenmachtfreude
Copy link

reisenmachtfreude commented Jul 3, 2021

I'm using vue3 and trying to replace the input element with a fancy v-text-field.
However, my try did not work.

		<template v-slot="{ subscribe, setEmail, error, success, loading }">
		<form @submit.prevent="subscribe">
			<v-text-field
			label="Your email address"
			:rules="rules"
			hide-details="auto"
			@input="setEmail($event.target.value)"
			></v-text-field> -->
			<button type="submit"><v-icon>mdi-email</v-icon></button>
			<div v-if="error">{{ error }}</div>
			<div v-if="success">Sucessfully subscribed!</div>
			<div v-if="loading">Loading…</div>
		</form>
		</template>

Error:
"TypeError: Cannot read property 'value' of undefined"

I would be happy if you can provide advice.

@ianfortier
Copy link

<v-text-field style="min-width: 100px;" @change="setEmail($event)" outlined class="white" hide-details single-line type="email" required :placeholder="$t('Your email address')"></v-text-field>

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

No branches or pull requests

2 participants