Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Using v-mask inside <keep-alive> #521

Open
prabodhana opened this issue May 10, 2021 · 1 comment
Open

Using v-mask inside <keep-alive> #521

prabodhana opened this issue May 10, 2021 · 1 comment
Labels

Comments

@prabodhana
Copy link

If I use this code in vue component inside its not working v-mask.. But type inside input field its working? Is there any limitation use v-mask inside . Also im tried removing after that this works without any issue.

<v-row>
          <v-col cols="12" sm="3">
            <v-text-field
              v-model="form.phone_number"
              v-mask="phoneNumberMask"
              dense
              outlined
              autocomplete="new-password"
              autofill="off"
              hide-details="auto"
              label="Phone Number"
              placeholder="Phone Number"
            />
          </v-col>
</v-row>

        <v-btn
              type="button"
              color="primary"
              @click="dataupdate()">
              test
            </v-btn>

export default {
  data () {
    return {
         form: {
                phone_number: null,
                phoneNumberMask:''

         }
}
method:{
    dataupdate () {
      this.form.phone_number = null
      this.form.phone_number = '4032223344'

      this.$nextTick(() => {
        this.phoneNumberMask = ['(', /\d/, /\d/, /\d/, ') ', /\d/, /\d/, /\d/, '-', /\d/, /\d/, /\d/, /\d/]
      })
    }

}

@probil
Copy link
Owner

probil commented Dec 12, 2021

Sounds like a bug to me. Need to check how keep-alive impacts directives inside

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants