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

Add allowBlank option

Open nholden opened this issue 6 years ago • 21 comments

Adds a new option that, when set to true, allows v-money fields to be initialized blank or cleared out by the user. The option is false by default, so it should not impact existing v-money fields.

Addresses https://github.com/vuejs-tips/v-money/issues/28

nholden avatar Feb 15 '18 00:02 nholden

This is a must!!!

gfviegas avatar Feb 15 '18 21:02 gfviegas

Thanks, @gfviegas! I'm referencing my fork at https://github.com/nholden/v-money in a project right now, but it would be great to see this or something similar included in a future release.

nholden avatar Feb 15 '18 22:02 nholden

Please accept this PR

remkobrenters avatar Mar 21 '18 09:03 remkobrenters

Please accept this PR

chiaretto avatar Mar 31 '18 19:03 chiaretto

Please accept this PR

paulpv avatar Apr 03 '18 20:04 paulpv

Looks like this was added way back in February, but still no merge :(

Is there a way to pull your version in through NPM, so I can use it, instead...?

DinsmoreDesign avatar May 07 '18 18:05 DinsmoreDesign

I'm using Yarn, so I ran the following to add my fork to a project.

yarn add nholden/v-money

Looks like that would also work for NPM, although I haven't tried it.

npm install nholden/v-money

nholden avatar May 07 '18 19:05 nholden

@nholden Ah dang, I didn't notice your implementation is only on the directive. Any plans to add it to the component version, as well?

DinsmoreDesign avatar May 07 '18 22:05 DinsmoreDesign

@DinsmoreDesign Seems like it wouldn't be too tricky. Let me take a closer look this evening and get back to you.

nholden avatar May 07 '18 23:05 nholden

@DinsmoreDesign I just updated this PR as well as my fork to add the allowBlank option to the <money> component. Here's a demo.

nholden avatar May 08 '18 01:05 nholden

@nholden Awesome! I was going to tinker with it and submit a pull request to your pull request, but that seemed like a lot of pull requests :P

DinsmoreDesign avatar May 08 '18 02:05 DinsmoreDesign

Really would like this pr merged 😄

Simsteve7 avatar May 15 '18 10:05 Simsteve7

Please accept this PR

breaktag avatar Jul 20 '18 15:07 breaktag

Hey, everybody!

Thanks for sharing that this PR is still relevant for you. To reduce the noise for everyone subscribed to this PR: if you'd like to voice your support for this moving forward, please give a 👍 to the original post.

If you need this functionality now, please see this comment on how to use my fork.

And, of course, if you have other feedback, feel free to comment.

Thanks!

nholden avatar Jul 20 '18 15:07 nholden

@neves can we get this please?

fmayoral avatar Dec 16 '18 22:12 fmayoral

Please accept this PR

zacharytyhacz avatar Dec 16 '19 21:12 zacharytyhacz

There's a bug. Input can be blank but it uses 0 value behind the scenes. It should be null.

tvavrys avatar Mar 12 '20 22:03 tvavrys

Any update about this PR?

marcusmouraoca avatar Apr 13 '20 19:04 marcusmouraoca

@marcusmouraoca: This is unlikely to be merged, and I'm not going to make any additional changes. If you need this functionality now, please see this comment on how to use my fork, or you can fork it yourself.

nholden avatar Apr 13 '20 23:04 nholden

image

fabianofernandeszup avatar Sep 15 '21 00:09 fabianofernandeszup

better late than never hell yeah

zacharytyhacz avatar Sep 15 '21 00:09 zacharytyhacz