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

Added flag to signal if resulting function value should be stringified or not #192

Merged
merged 2 commits into from
Jul 30, 2017

Conversation

enver
Copy link
Contributor

@enver enver commented Jul 30, 2017

As discussed in #101 added flag to signal if resulting function value should be stringified or not. By default it is set to true to keep backward compatibility.

With this fix you can properly format numbers with comma as a decimal point. e.g.

fields: [
...
{
  value: function(row, field, data) {
    return row['price'].toLocaleString();
  },
  label: 'Price'
  default: 0,
  stringify: false
},
...          
]

and resulting CSV should look like this:

Quantity;Price;Unit
1;22,3;"kg"

instead of:

Quantity;Price;Unit
1;"22,3";"kg"

…d or not. By default it is set to true to keep backward compatibility
@coveralls
Copy link

coveralls commented Jul 30, 2017

Coverage Status

Coverage decreased (-0.7%) to 99.329% when pulling ad606e8 on enver:master into e706c25 on zemirco:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 2bf617d on enver:master into e706c25 on zemirco:master.

2 similar comments
@coveralls
Copy link

coveralls commented Jul 30, 2017

Coverage Status

Coverage remained the same at 100.0% when pulling 2bf617d on enver:master into e706c25 on zemirco:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 2bf617d on enver:master into e706c25 on zemirco:master.

Copy link
Collaborator

@knownasilya knownasilya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good :)

@knownasilya knownasilya merged commit aaa6b05 into zemirco:master Jul 30, 2017
@knownasilya
Copy link
Collaborator

Released as v3.11.0

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

Successfully merging this pull request may close these issues.

3 participants