v-mask icon indicating copy to clipboard operation
v-mask copied to clipboard

Using v-mask inside <keep-alive>

Open prabodhana opened this issue 3 years ago • 1 comments

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/]
      })
    }

}

prabodhana avatar May 10 '21 09:05 prabodhana

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

probil avatar Dec 12 '21 12:12 probil