Quasar: [Proposal] clearable & clear-value behaviour

Created on 27 Apr 2018  路  8Comments  路  Source: quasarframework/quasar

If element has clearable & clear-value property, is it possible to hide clear button when current value equals clear-value?
I think this useful, because shows that user select/enter not default value.

All 8 comments

Hey, I hope I understand your proposal correctly, but what you describe is very easily doable in userland. That's why I think adding another prop would only be confusing.

You can see this JSFiddle for a small demo of how you can implement this yourself.
https://jsfiddle.net/a47ae/waugrryy/1749/

https://jsfiddle.net/zqdjy76d/
https://jsfiddle.net/Lcytya3x/

No, there is no need to add new property.
In my example I want to hide clear icon, when current value equal to clear-value property.
Is my explanation enough for understand?

BTW, clear-value is not exist in documentation, my PR not confirm at this moment.

@olegvakulenko Did you take a look at my JSFiddle?
Enter test and you notice that the clear button disappears.

Your proposal would need for a clear-value property on all inputs, which in my opinion is unnecessary, as you can do it in userland like shown in my JSFiddle.

clear-value property already exist in JS.

Ah sorry, did not notice that :)
Sorry for misunderstanding your intentions, but now makes sense to me. :+1:

IMHO, clearable & clear-value very useful properties.

Was this page helpful?
0 / 5 - 0 ratings