Combobox: fix icon padding issue with compact mode
This commit is contained in:
@@ -41,7 +41,7 @@
|
|||||||
import Label from './Label.svelte';
|
import Label from './Label.svelte';
|
||||||
import StyledRawInput from './StyledRawInput.svelte';
|
import StyledRawInput from './StyledRawInput.svelte';
|
||||||
import { InputValidatorEvent, validate, type ValidatorOptions } from '@svelte-toolkit/validate';
|
import { InputValidatorEvent, validate, type ValidatorOptions } from '@svelte-toolkit/validate';
|
||||||
import { untrack, type Snippet } from 'svelte';
|
import { type Snippet } from 'svelte';
|
||||||
import { scale } from 'svelte/transition';
|
import { scale } from 'svelte/transition';
|
||||||
import { generateIdentifier, type IconDef } from './util';
|
import { generateIdentifier, type IconDef } from './util';
|
||||||
import type { ClassValue, MouseEventHandler } from 'svelte/elements';
|
import type { ClassValue, MouseEventHandler } from 'svelte/elements';
|
||||||
@@ -314,12 +314,8 @@
|
|||||||
easing: cubicOut
|
easing: cubicOut
|
||||||
});
|
});
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
if (iconWidth >= 0) {
|
|
||||||
untrack(() => {
|
|
||||||
inputPadding.target = calculatePadding();
|
inputPadding.target = calculatePadding();
|
||||||
});
|
});
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
/*** HELPER FUNCTIONS ***/
|
/*** HELPER FUNCTIONS ***/
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user