Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Number filter #77

Closed
MaximilianFranke opened this issue Oct 1, 2019 · 8 comments
Closed

Number filter #77

MaximilianFranke opened this issue Oct 1, 2019 · 8 comments

Comments

@MaximilianFranke
Copy link

A filter like the currency filter would be nice for numbers just without the currency symbol.
E.g.:
{{ amount | number(0, { thousandsSeparator: '.' }) }} // 12345 => 12.345

@freearhey
Copy link
Owner

I added a 'number()' filter to the library. You can try it by upgrading to v0.8.0-beta.1, like so:

npm install vue2-filters@0.8.0-beta.1

The documentation for it here: https://github.com/freearhey/vue2-filters#number

Please check it. And if there are no problems, then I will make a full release of v0.8.0

@MaximilianFranke
Copy link
Author

Thanks. Works like expected. The global configuration doc,could be updated. But that was self explained for me. But a global configurable default format (currently static '0') would be awesome. Should i do a seperate Issue for that?

@freearhey
Copy link
Owner

@MaximilianFranke I finally found time to update the documentation and add the format to the global options. I also added the option showPlusSign for the currency() filter. All of this is available in v0.8.0-beta.2. It would be nice if you could check again if everything works before I publish the final build.

@kevinasurjadi
Copy link

In my nuxt project, the global configurations for number filters is not working. But the global configuration for other filter like currency is working perfectly. It works fine when it is configured locally but I have to do it repeatedly, I think it would be better if the global configurations is working.

Nuxt version: 2.10.1
vue2-filters: 0.8.0-beta.2

@freearhey
Copy link
Owner

@kevinalexandersurjadi Thanks for your feedback! I will try to figure out what is wrong and publish a fixed version of ASAP.

@freearhey
Copy link
Owner

@kevinalexandersurjadi I think I found what the problem was and I've already published a new version of the package: 0.8.0-beta.3 Let me know if that helps.

@kevinasurjadi
Copy link

Cool!! Now it's working perfectly @freearhey !! Thanks

@freearhey
Copy link
Owner

Done. Release v0.8.0 is available for use.

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

No branches or pull requests

3 participants