Skip to content

Commit

Permalink
Fix TextField handling of unspecified operators (and thus restore Qui…
Browse files Browse the repository at this point in the history
…ckSearch)
  • Loading branch information
techniq committed Nov 10, 2023
1 parent e8e4736 commit 52c262e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/components/TextField.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
export let actions: Actions<HTMLInputElement | HTMLTextAreaElement> | undefined = autofocus
? (node) => [autoFocus(node, typeof autofocus === 'object' ? autofocus : undefined)]
: undefined;
export let operators: { label: string; value: string }[] = [];
export let operators: { label: string; value: string }[] | undefined = undefined;
export let inputEl: HTMLInputElement | null = null;
export let debounceChange: boolean | number = false;
export let classes: {
Expand Down Expand Up @@ -149,7 +149,7 @@
}
function handleInput(e: Event) {
const elm = (e.target as (HTMLTextAreaElement|HTMLInputElement));
const elm = e.target as HTMLTextAreaElement | HTMLInputElement;
if (accept) {
// filter input based on accepted characters
const regex = new RegExp(accept, 'g');
Expand Down Expand Up @@ -254,7 +254,7 @@
{/if}

<!-- svelte-ignore a11y-click-events-have-key-events -->
<div role={role === "combobox" ? role : undefined} class="flex-grow inline-grid" on:click>
<div role={role === 'combobox' ? role : undefined} class="flex-grow inline-grid" on:click>
{#if label && ['inset', 'float'].includes(labelPlacement)}
<label
class={cls(
Expand Down

1 comment on commit 52c262e

@vercel
Copy link

@vercel vercel bot commented on 52c262e Nov 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.