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

fix(VOtpInput): form data support #17955

Merged
merged 2 commits into from
Aug 8, 2023
Merged

fix(VOtpInput): form data support #17955

merged 2 commits into from
Aug 8, 2023

Conversation

johnleider
Copy link
Member

Motivation and Context

reference: https://discord.com/channels/340160225338195969/660898563139567625/1136629895330533406

Markup:

<template>
  <v-app>
    <div class="ma-4 pa-4">
      <form id="form" ref="form">
        <v-otp-input v-model="model" name="otp" @input="onInput" />
      </form>
    </div>
  </v-app>
</template>

<script setup>
  import { ref } from 'vue'

  const form = ref()
  const model = ref('')

  function onInput () {
    const news = new FormData(form.value)

    console.log(news.get('otp'))
  }
</script>

@johnleider johnleider added T: bug Functionality that does not work as intended/expected C: VOtpInput VOtpInput labels Aug 3, 2023
@johnleider johnleider self-assigned this Aug 3, 2023
@@ -16,6 +16,9 @@
height: 100%
margin: 0 .25rem

.v-otp-input-input
display: none
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

input type="hidden"?


It is recommended to familiarize yourself with the [Treeshaking](/features/treeshaking/) guide before continuing.

:::
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong branch?

@KaelWD KaelWD added this to the v3.3.x milestone Aug 8, 2023
@KaelWD KaelWD merged commit 75aeb85 into master Aug 8, 2023
17 of 18 checks passed
@KaelWD KaelWD deleted the fix/otp-input-form-data branch August 8, 2023 15:36
prashantsinghb pushed a commit to prashantsinghb/vuetify that referenced this pull request Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VOtpInput VOtpInput T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants