-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
TomSelectRemote: preload option behavior undesirable #539
Comments
Hello, The "focus" value for preloading can be used with |
Ok but how can I get the correct behavior for preload which is to load the data when the TomSelectRemote is inserted then process additional load calls when something is typed in the input? |
As you have correctly noticed, the But you can also use the |
OK that is perfect thank you, I will use the tsOptions for now. Thank you for your help again. |
Just incase anyone else has this issue... setting the TomSelectRemote tsOptions does nothing to solve this...
Same behavior as normal. You have to set tomSelectRemote.input.tsOptions
This works. |
This looks like a bug. I'll check that. |
Test app here if it helps |
Fixed in 8.0.1 |
When using TomSelectRemote the preload option breaks loading of subsequent requests.
https://github.com/rjaros/kvision/blob/41b07b48f5386afe34eaf8fb3da361fb12d498b7/kvision-modules/kvision-tom-select-remote/src/jsMain/kotlin/io/kvision/form/select/TomSelectRemoteInput.kt#L74C1-L79C20
The option as it is seems to be concluding that the list would be a set list called at init and never changed. If this was a desired behavior it would be better to change preload to an enum as it essentially is in the TomSelect js.
In js you can set, preload = true/false or "focus", an additional option could be added "once" or similar.
So we would have
The text was updated successfully, but these errors were encountered: