Skip to content

Conversation

@ZktSn0w
Copy link

@ZktSn0w ZktSn0w commented Jul 18, 2025

This feature is needed in my application and i think it might be a quite common approach that would give back more control to the Developer using this Library.

It might be that there are complex data-structures that have to be dealt with before sending an fetch request.
an beforeFetch Callback would make the DX worse in my opinion.

making the input_value an bindable prop would also be an valid solution, just tell me what you think would be better

You might want to squash this PR

@vercel
Copy link

vercel bot commented Jul 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
svelecte ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 18, 2025 7:26am

@jbirtel
Copy link
Contributor

jbirtel commented Jan 9, 2026

I also want the option to bind to the input_value of the user. This would allow me to use a custom filtering based on the input value. I only want to show 10 entries and I need to collect options from two sources - one data map held in my frontend, and an optional API request returning more options in case I have less than 10 frontend options matching the search string.
It could somehow be implemented as a filter, but I don't see the option to define a custom filter logic by myself, so defining the options and disabling filtering and sorting would be the way to go.

However, regarding the provided solution: maybe the update in the effect should only happen, if the new value in input_value is different from the old value such that effect is not causing any performance issues. So checking for that might be a performance optimization.

Moreover, I would love to have an adequate solution in v4 also, since the migration to v5 did not yet happen due to several other dependencies.

@mskocik
Copy link
Owner

mskocik commented Jan 9, 2026

What about this example? https://svelte.dev/playground/f39cc6569cc946d18799964f6a9e7f1e?version=latest

Is it what you need or is it something completely different?

@jbirtel
Copy link
Contributor

jbirtel commented Jan 9, 2026

@mskocik
Yes, that could indeed work, but for me this seems rather a usage around the lib than an intentional way of using it. (Having to make an event listener for the input field manually)

However, I need it for one case and could probably live with it.
I think, one would need to reset searchable somewhere because I am not able to type again after selecting.

@github-actions github-actions bot removed the Stale label Jan 10, 2026
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.

4 participants