Skip to content

Commit

Permalink
feat: display number nicely
Browse files Browse the repository at this point in the history
  • Loading branch information
edelclaux committed Dec 9, 2024
1 parent 222c408 commit 01a3926
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
{{ renderDate(date) }}
</ng-template>

<ng-template
#cellNumberTemplate
let-value="value"
>
{{ value ? value : '-' }}
</ng-template>

<ng-template
#cellDefaultTemplate
let-value="value"
Expand Down Expand Up @@ -77,7 +84,7 @@
let-row="row"
>
<ng-template
*ngTemplateOutlet="cellDefaultTemplate; context: { value: row[PROP_OBSERVATION_COUNT] }"
*ngTemplateOutlet="cellNumberTemplate; context: { value: row[PROP_OBSERVATION_COUNT] }"
></ng-template>
</ng-template>
</ngx-datatable-column>
Expand All @@ -90,7 +97,7 @@
let-row="row"
>
<ng-template
*ngTemplateOutlet="cellDefaultTemplate; context: { value: row[PROP_MEDIA_COUNT] }"
*ngTemplateOutlet="cellNumberTemplate; context: { value: row[PROP_MEDIA_COUNT] }"
></ng-template>
</ng-template>
</ngx-datatable-column>
Expand Down

0 comments on commit 01a3926

Please sign in to comment.