You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to add autocompletion if the input has a specific prefix, if not I want that the user can enter whatever they want without autocompletion. Basically the same functionality as here on GitHub when entering "@" or "#", but I only care if that symbol is at the start of the input. Another good example would be on discord when starting a message with "/" - this is exactly what I want.
I already tried to disable the component, but that breaks the whole input. I also tried to work with multiple search values but sadly I can't figure out a solution.
I have a nearly working example, the main problem is that it's not taking the "$" to Svelecte. Using "value" isn't working as it's not a matching object because it's (at this stage) just the input and not a selection. Besides that, if I remove the $ (e.g. deleting the whole input) I want to go back to the normal input. I firstly thought valueField would be what I need but it isn't.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I want to add autocompletion if the input has a specific prefix, if not I want that the user can enter whatever they want without autocompletion. Basically the same functionality as here on GitHub when entering "@" or "#", but I only care if that symbol is at the start of the input. Another good example would be on discord when starting a message with "/" - this is exactly what I want.
I already tried to disable the component, but that breaks the whole input. I also tried to work with multiple search values but sadly I can't figure out a solution.
I have a nearly working example, the main problem is that it's not taking the "$" to Svelecte. Using "value" isn't working as it's not a matching object because it's (at this stage) just the input and not a selection. Besides that, if I remove the $ (e.g. deleting the whole input) I want to go back to the normal input. I firstly thought valueField would be what I need but it isn't.
Here's a short REPL link which also shows the current variable and keeps the focus:
https://svelte.dev/repl/90b7c2a30e22422ab50619d8e2007847?version=4.2.17
The easiest solution would be to simply disable or enable the selection I guess(?)
Beta Was this translation helpful? Give feedback.
All reactions