mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-20 20:33:02 +00:00
fix(list-box-selection): use default translations if translateWithId
is undefined
This commit is contained in:
parent
8ddb88af23
commit
1353c31642
1 changed files with 6 additions and 3 deletions
|
@ -41,9 +41,12 @@
|
||||||
ctx.declareRef({ key: "selection", ref });
|
ctx.declareRef({ key: "selection", ref });
|
||||||
}
|
}
|
||||||
|
|
||||||
$: description = selectionCount
|
$: translationId = selectionCount
|
||||||
? translateWithId("clearAll")
|
? translationIds.clearAll
|
||||||
: translateWithId("clearSelection");
|
: translationIds.clearSelection;
|
||||||
|
|
||||||
|
$: description =
|
||||||
|
translateWithId?.(translationId) ?? defaultTranslations[translationId];
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if selectionCount !== undefined}
|
{#if selectionCount !== undefined}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue