Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting a threshold score for result to be considered a match #83

Open
thedivtagguy opened this issue Dec 24, 2023 · 0 comments
Open

Comments

@thedivtagguy
Copy link

I'd like to be able to set a threshold on what is considered a match. This is what I do right now:

<Typeahead
	hideLabel
	label="Search works"
	placeholder="Try me..."
	{data}
	{extract}
	let:result
	let:value
>
	{#if result.score >= 20}
		<div>
			<strong>{getTitle(result.original)}</strong>
		</div>
	{/if}
</Typeahead>

This kinda works, but I still see empty boxes where the results below threshold are:
image

Allowing for something like this to be set so only very close matches are shown would be nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant