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 });
|
||||
}
|
||||
|
||||
$: description = selectionCount
|
||||
? translateWithId("clearAll")
|
||||
: translateWithId("clearSelection");
|
||||
$: translationId = selectionCount
|
||||
? translationIds.clearAll
|
||||
: translationIds.clearSelection;
|
||||
|
||||
$: description =
|
||||
translateWithId?.(translationId) ?? defaultTranslations[translationId];
|
||||
</script>
|
||||
|
||||
{#if selectionCount !== undefined}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue