Set default getOptionIcon prop in core Picker to avoid crash
This commit is contained in:
parent
c48300b159
commit
e44a82bb72
|
@ -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"
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in New Issue