Skip to content

bug: vue: ion-input ignores the v-model.lazy modifier #31761

Open

Description

@averyrousseau

Prerequisites

Ionic Framework Version

v9.x

Current Behavior

Ion-input doesn't appear to support Vue's lazy modifier on v-model: https://vuejs.org/guide/essentials/forms.html#modifiers The associated ref still updates on every keystroke, rather than on the change event.

Expected Behavior

With v-model.lazy, the connected ref should only update when the input is blurred.

Steps to Reproduce

  1. Go to: https://stackblitz.com/edit/duayqrjj?file=src%2Fcomponents%2FExample.vue Note v-model.lazy on both inputs.
  2. Enter any text in the ion-input. Note that the item underneath updates on every keystroke.
  3. Enter any text in the vanilla input. Note that the item underneath only updates when the input is blurred.

Code Reproduction URL

https://stackblitz.com/edit/duayqrjj?file=src%2Fcomponents%2FExample.vue

Ionic Info

N/A (see stackblitz)

Additional Information

This can be worked around by keeping the ref in sync manually:

<ion-input :value="inputValue" @ionChange="e => inputValue = e.target.value"></ion-input>

Activity

  1. changed the title [-]bug: ion-input doesn't support lazy modifier on v-model[/-] [+]bug: vue: ion-input ignores the v-model.lazy modifier[/+] on Nov 18, 2026
  2. thetaPC commented on Nov 18, 2026

    @thetaPC
    Contributor

    Thanks for the report.

    Verified on 9.0.12. For components, Vue applies the .trim and .number modifiers itself but leaves .lazy for the component to handle. The Vue wrapper for ion-input ignores it and always updates the bound value on ionInput, which fires on every keystroke. The same happens on ion-textarea, ion-searchbar, ion-input-otp and ion-range.

    The workaround in your report works, also verified on 9.0.12. ionChange fires at the same moments as a native change event, on Enter or on blur after an edit:

    <template>
      <ion-input label="Name" :value="name" @ionChange="name = $event.target.value"></ion-input>
    </template>
    
    <script setup lang="ts">
    import { ref } from 'vue';
    import { IonInput } from '@ionic/vue';
    
    const name = ref('');
    </script>

    Tracked as a bug in @ionic/vue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions