fix PhoneInput combobox icon override
This commit is contained in:
@@ -50,8 +50,7 @@
|
||||
const options: ComboboxOption[] = countries.map((country) => ({
|
||||
value: country.isoCode,
|
||||
label: `${country.name} (+${country.phonecode})`,
|
||||
preview: `+${country.phonecode}`,
|
||||
icon: renderIcon
|
||||
preview: `+${country.phonecode}`
|
||||
}));
|
||||
|
||||
let phonecode: string = $derived.by(() => {
|
||||
@@ -118,12 +117,6 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
{#snippet renderIcon(item: ComboboxOption)}
|
||||
{#if countrycodeMap[item.value]?.flag}
|
||||
{countrycodeMap[item.value].flag}
|
||||
{/if}
|
||||
{/snippet}
|
||||
|
||||
<div class={classValue}>
|
||||
{#if label}
|
||||
<Label for={id}>{label}</Label>
|
||||
@@ -149,7 +142,13 @@
|
||||
countriesValid = e.detail.valid;
|
||||
}}
|
||||
invalidMessage={null}
|
||||
/>
|
||||
>
|
||||
{#snippet iconRender(opt)}
|
||||
{#if countrycodeMap[opt.value]?.flag}
|
||||
{countrycodeMap[opt.value].flag}
|
||||
{/if}
|
||||
{/snippet}
|
||||
</Combobox>
|
||||
</div>
|
||||
|
||||
<div class="w-full">
|
||||
|
||||
Reference in New Issue
Block a user