Skip to content

Add optional fuzzy search to searchable select component - #453

Merged
stephanie-jauss merged 3 commits into
mainfrom
feat/search-select-fuzzy
Jun 23, 2026
Merged

stephanie-jauss merged 3 commits into
mainfrom
feat/search-select-fuzzy

Conversation

@stephanie-jauss

Copy link
Copy Markdown
Contributor

Added fuzzy search support based on fuse.js to the searchable select component. Can be activated (default false) and threshold can be adjusted according to the data (default 0.35).

@sjockers sjockers left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm, thanks!

<slot name="empty">
{emptyText}
</slot>
</div>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Using slot is deprecated in Svelte 5, but I think there's no way around it with svelte-select, because it does not support @render (yet?).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We are also using slot already elsewhere, so I guess this is fine!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah I think we could adjust that everywhere in the future, didn't touch it for now

"dependencies": {
"@maplibre/maplibre-gl-geocoder": "1.9.1",
"@maplibre/maplibre-gl-inspect": "1.7.1",
"fuse.js": "7.4.2",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

@stephanie-jauss
stephanie-jauss merged commit 7f7825b into main Jun 23, 2026
2 checks passed
@stephanie-jauss
stephanie-jauss deleted the feat/search-select-fuzzy branch June 23, 2026 09:59
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

Successfully merging this pull request may close these issues.

2 participants