[ui] fix Ellipsis bug due to multiple spaces

feat/vaults
Tomáš Mládek 2022-02-15 22:33:52 +01:00
parent b02b6d7feb
commit 1176d2e7ae
No known key found for this signature in database
GPG Key ID: 65E225C8B3E2ED8A
1 changed files with 2 additions and 2 deletions

View File

@ -2,10 +2,10 @@
export let value: string;
export let title: string | undefined = undefined;
$: valueStart = value.substring(0, value.length - 7).replace(" ", "\xa0");
$: valueStart = value.substring(0, value.length - 7).replace(/\s/g, "\xa0");
$: valueEnd = value
.substring(value.length - 7, value.length)
.replace(" ", "\xa0");
.replace(/\s/g, "\xa0");
</script>
<div class="ellipsis" title={title || value}>