fix: ComboBox, MultiSelect should have multiple translateWithId functions (#1283)

* fix(combo-box): ListBoxField and ListBoxSelection have different `translateWithId` props

* fix(multi-select): ListBoxField and ListBoxSelection have different `translateWithId` props

* Run "yarn build docs"

* test: assert translateWithIdMenu, translateWIthIdInput props
This commit is contained in:
metonym 2022-05-04 07:17:35 -07:00 committed by GitHub
commit ff2e6276db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 176 additions and 66 deletions

View file

@ -81,6 +81,18 @@
*/
export let translateWithId = undefined;
/**
* Override the default translation ids for the menu
* @type {(id: any) => string}
*/
export let translateWithIdMenu = undefined;
/**
* Override the default translation ids for the input
* @type {(id: any) => string}
*/
export let translateWithIdInput = undefined;
/** Set an id for the list box component */
export let id = "ccs-" + Math.random().toString(36);
@ -231,7 +243,7 @@
}}"
id="{id}"
disabled="{disabled}"
translateWithId="{translateWithId}"
translateWithId="{translateWithIdMenu}"
>
<input
bind:this="{ref}"
@ -325,7 +337,7 @@
<ListBoxSelection
on:clear
on:clear="{clear}"
translateWithId="{translateWithId}"
translateWithId="{translateWithIdInput}"
disabled="{disabled}"
open="{open}"
/>