Use single number formatter for more performant locale string conversions
This commit is contained in:
parent
1109e27b04
commit
1509d7d650
|
@ -1,3 +1,7 @@
|
|||
<script context="module">
|
||||
const NumberFormatter = Intl.NumberFormat()
|
||||
</script>
|
||||
|
||||
<script>
|
||||
import { onMount } from "svelte"
|
||||
|
||||
|
@ -53,7 +57,7 @@
|
|||
<div class="text-cell" class:number={type === "number"}>
|
||||
<div class="value">
|
||||
{#if type === "number"}
|
||||
{(value ?? "").toLocaleString()}
|
||||
{NumberFormatter.format(value ?? "")}
|
||||
{:else}
|
||||
{value ?? ""}
|
||||
{/if}
|
||||
|
|
Loading…
Reference in New Issue