Vuetify: v-text-field's click:clear does not accurately replace deprecated clear-icon-cb

Created on 3 Oct 2018  路  1Comment  路  Source: vuetifyjs/vuetify

Using clear-icon-cb prop on v-text-field prompts the user in console that the functionality is deprecated and to instead use @click:clear. The new method for handling clearable callbacks works differently from its previous implementation.

Versions and Environment

Vuetify: 1.2.6
Vue: 2.5.17
Browsers: Chrome
OS: Windows

Previously worked in:

Vuetify:
Vue:

Steps to reproduce


Create a v-text-field that uses the clearable prop and uses the clear-icon-cb prop.
Create another v-text-field that uses the clearable prop and uses the click:clear binding.
Inspect the length of the value of the cleared values.

Inspect the values afterwards.

Expected Behavior


I would expect the behavior to work the same between the deprecated props and the recommended handler - that is, if I handle the value in the callback/handler I expect it to be actually set.

Actual Behavior


The new method seems to set the value to null even if the handler is explicitly setting it to something else.

Reproduction Link


https://codepen.io/anon/pen/EdPzBd?editors=1011


Additional Comments:

>All comments

This was in fact the exact behavior as before, https://codepen.io/johnjleider/pen/jeMMgd?editors=1011 . In fact, we actually did not properly deprecate the existing value in that it no longer actually clears the input unless the user does so in their callback.

Long story short, it's working as intended.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alterhu2020 picture alterhu2020  路  3Comments

cawa-93 picture cawa-93  路  3Comments

itanka9 picture itanka9  路  3Comments

sebastianmacias picture sebastianmacias  路  3Comments

smousa picture smousa  路  3Comments