Skip to content

Commit

Permalink
don't rely on svelte 5 feature
Browse files Browse the repository at this point in the history
  • Loading branch information
hahn-kev committed Jan 14, 2025
1 parent 0ae9bfd commit 1375d1c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/svelte-ux/src/lib/components/TextField.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
: undefined;
export let operators: { label: string; value: string }[] | undefined = undefined;
export let inputEl: HTMLInputElement | HTMLTextAreaElement | null = null;
// this is a workaround because Input only accepts an HTMLInputElement, not a TextAreaElement
const inputHolder = { set input(value: HTMLInputElement | null) { inputEl = value; } };
export let debounceChange: boolean | number = false;
export let classes: {
root?: string;
Expand Down Expand Up @@ -367,7 +369,7 @@
{max}
{step}
{actions}
bind:inputEl={null, (el) => (inputEl = el ?? null)}
bind:inputEl={inputHolder.input}
on:input={handleInput}
on:focus
on:blur
Expand Down

0 comments on commit 1375d1c

Please sign in to comment.