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
Display Problem UX Autocomplete / TomSelect #1616
Comments
Do you use LiveComponent or is this with Autocomplete "only" ? |
It is only the autocomplete without the live component. |
When you say "newest version" do you know if you used Autocomplete 2.14 or 2.15 previously ? Could create a minimal reproducer ? That would be a great help to start the investigation / bug fix :) |
I just recognised the behaviour yesterday with 2.16, and also tried 2.14 and 2.15 now, that happens also with these versions. Here is a minimal project (blank Symfony project) that reproduces the behaviour: |
That explains the behaviour, but not why it occurs. They released last time in Oct 2023: https://github.com/orchidjs/tom-select/releases I'm not sure if it already happens since then. But does it make sense to downgrade the tom select below 2.3? |
Can you remove the groups temporarely ? |
In the reproducer I added one UX Autocomplete/Tom select without the groups. That works fine, but for my project the groups are necessary. |
And does it work without UxAutocomplete ? |
I tried it on the reproducer with tom select 2.3.1, 2.3.0 and 2.2.2 and the problem occurs on all versions. I'm not really sure if its a problem on tom select or Symfony ux component?! |
Even with just TomSelect and no UXAutocomplete ? |
It was with UX Autocomplete. |
For me the simple HTML tomselect sample worked, now I am confused. that the test.html not work for you or is the code just wrong but displayed correctly? |
Just saw this in the documentation, maybe you could try with the options as shown here ? Not sure if that can/should be in the JS options to TomSelect, or in the form... but this is something you should investigate, as TomSelect has some documentation on it: https://tom-select.js.org/plugins/optgroup-columns/ {
"results": {
"options": [
{ "value": "1", "text": "Pizza", "group_by": ["food"] },
{ "value": "2", "text": "Banana", "group_by": ["food"] }
],
"optgroups": [{ "value": "food", "label": "food" }]
}
} |
I think that is needed if the tomselect is bound the a free (not entity bound) Ajax source. in this case there is no Ajax loading for the tom select, the input options and groups are just sent when generating the (tom) select. |
I have the problem with the newest version, that on grouped Autocomplete/TomSelect, the selected item gets duplicated to the end of the list, or sometimes the grouping completely disappears.
Like in this example:
Before selecting a different item:
After selecting the other item:
With other UX Autocompletes the items are additionally added to the bottom of the list as new items.
Tested on safari and firefox.
symfony/ux-autocomplete 2.16.0
tom-select 2.3.1
Does anyone have these effects too?
The text was updated successfully, but these errors were encountered: