Skip to content
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

Dropdown items loose ordered upon typing #4545

Closed
3 tasks done
aldas opened this issue Jan 9, 2024 · 2 comments · Fixed by #4580
Closed
3 tasks done

Dropdown items loose ordered upon typing #4545

aldas opened this issue Jan 9, 2024 · 2 comments · Fixed by #4580

Comments

@aldas
Copy link

aldas commented Jan 9, 2024

Describe the issue

Unlike 1.30.X version when adding new calendar item and starting to type in Activities list, the list that poped up - it was sorted (alphabetically I think). In 2.7.0+ it is not anymore.

When I inspect source the HTML option elements seem to be ordered correctly but when the autocomplete list is rendered the items seem to be out of order.

Example:
image

I already tried

Kimai version

2.7.0

How do you run Kimai?

Docker

Which PHP version are you using?

8.1

Logfile

No response

Screenshots

From Kimai demo site: https://demo.kimai.org/

Added 3 activities: "test 1", "test 2", "test x 3"

when typing "est" into activities autocomplete field the following options are shown and they do not seem to be ordered alphabetically.
image

@aldas aldas added the bug label Jan 9, 2024
@aldas
Copy link
Author

aldas commented Jan 23, 2024

I have not tested this with Kimai, but maybe adding

sortField to options would help getting displayed list ordered.

p.s. dunno if I even linked correct place. I have no understanding understanding how Kimai displays forms and does JS

@kevinpapst
Copy link
Member

Just for reference, add:

sortField:[{field:'$order'},{field:'$score'}]

to https://github.com/kimai/kimai/blob/main/assets/js/forms/KimaiFormSelect.js#L85

@kevinpapst kevinpapst mentioned this issue Feb 2, 2024
6 tasks
@kevinpapst kevinpapst changed the title Calendar view: Activities autocomplete list is not ordered anymore Dropdown items is not ordered anymore upon searching Feb 2, 2024
@kevinpapst kevinpapst added this to the 3.0 - Planned features milestone Feb 2, 2024
@kevinpapst kevinpapst changed the title Dropdown items is not ordered anymore upon searching Dropdown items loose ordered upon typing Feb 2, 2024
@kevinpapst kevinpapst removed this from the Planned features milestone Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants