Set default getOptionIcon prop in core Picker to avoid crash

This commit is contained in:
Andrew Kingston 2021-07-21 14:35:55 +01:00
parent 1effdc0e8f
commit f91115fc0f
1 changed files with 3 additions and 3 deletions

View File

@ -18,7 +18,7 @@
export let onSelectOption = () => {}
export let getOptionLabel = option => option
export let getOptionValue = option => option
export let getOptionIcon = null
export let getOptionIcon = () => null
export let open = false
export let readonly = false
export let quiet = false
@ -45,7 +45,7 @@
>
{#if fieldIcon}
<span class="icon-Placeholder-Padding">
<img src={fieldIcon} alt="Picker Icon" width="20" height="15" />
<img src={fieldIcon} alt="icon" width="20" height="15" />
</span>
{/if}
@ -115,7 +115,7 @@
<span class="icon-Padding">
<img
src={getOptionIcon(option, idx)}
alt="test"
alt="icon"
width="20"
height="15"
/>