-
Notifications
You must be signed in to change notification settings - Fork 71
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
How can I set specific format for Columns ? #15
Comments
Hi :) I have the same issue and it is indeed very tricky. (the whole library is tricky but this one in particuliar) It is currently not possible. To solve this problem I introduced additional parameters to the The idea is that if you have a row or column that should generate a row or column formatted as a currency only for a specific value, you will want to provide a <template v-slot:value="{ value, col, row }">
<template v-if="checkIfCurrency(col, row)">{{ value | currency }}</template>
<template v-else>{{ value }}</template>
</template> But the I think I need to provide a way to get the row/column fields selected by the user, so that this function can check the right value. |
Hi antoinematyja , In my case, if I try use a function similar to "checkIfCurrency, the parameters col and row, are undefined. I dont know wy. |
You are probably using an old version, these parameters were added in v0.2.1. Can you tell me what version you are using ? Also I just released v1.0.0 which changed a little bit the |
Its true, Im using the version 0.0.1, because I created my project based on the project of "mitsakosgr" , he create a solution that allow I can use different algoritms by Colfield. I will try merge the solutions, and after solve this problem. In my local solution, I implemented grand total by grouping, after merge, I share with you. Thanks a lot |
antoinematyja how are you ? i got it to format the columns in another way. I created an hash that stores the columns key that have slotName, like implemented in rowFields, and I use a similar method like "value" to retrieve the slotName of column. In this way, I need when I use the pivotTable component, list one slot per column field. Thanks for your help |
Hi how are you ?
I need format the columns that have numeric values, including monetary symbol. But, I can have in same pivot table, different columns, that must have different formats, one can be money, other can be percent and etc.
I believe, using "{{ value.toLocaleString }}" I can do that, but, I dont know how can I check what field are to apply the specific format.
Can you help-me ?
Thanks a lot
The text was updated successfully, but these errors were encountered: