1
0
Fork 0
mirror of synced 2024-07-07 15:25:52 +12:00

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 c48300b159
commit e44a82bb72

View file

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