totaljs / components

Components for Componentator
MIT License
86 stars 61 forks source link

j-DataGrid dynamic `currency` #223

Closed Invincible83 closed 1 year ago

Invincible83 commented 1 year ago

Hi,

Is there any way to dynamically set the currency?

Example of the template:

{ name: 'total', text: 'Total', currency: '{{ currency }}', width: 100 },

and the value could look like this

[
{ id: '5', total: '100', currency: 'usd' }
]

Thank you

petersirka commented 1 year ago

Try this:

{ name: 'total', template: '{{ total | currency(currency) }}', width: 100 }
Invincible83 commented 1 year ago

Wow, didn't know that.

Thank you