-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Replace the Select component with Autocomplete component on bigger lists #1189
Conversation
Have you tested it to see if there are any glitches when you select some really long name? In mobile or desktop view. |
Hm, indeed it goes into two rows on multiple options. I guess before I investigate this - the question is what's the desired behaviour. Do we do it exactly like it was now - where (with multiple choices) all of them are in the same line and it does not wrap/you cannot see them (with this option, do we want to indicate how many are selected with the +1... like in screenshots above?). Or do we make the box autosize so you can always see all of the selected option (even when there is no focus)? |
For the report it definitely make sense to limit to one line. Otherwise it will look very odd. |
Another option would be that we hide the selected devices on focus/open, and only display the text input. When closed/out of focus we display the selected devices like in above screenshot (so just that one line). This is the only feasible option if we want to keep it always in one line (even when inputting text). The selected devices are highlighted in the dropdown options too (so you can deselect them). |
Why can't we add search with the same way it's displayed now? |
We need to fit a text input somewhere (for the search texts). By default Autocomplete fits it in with the selected values / new line if you limit the amount of selected values. So the difference is that old Select had 2 components (selected values, list) whereas Autocomplete has 3 (selected values, list, search input for the list). And just a reminder, this is all for multiple choices, single choice does not have this problem. |
So I finally have some more time (or will in near future) to try to find a solution for this. |
Sounds good to me. |
Hi,
this PR replaces the non searchable Select component with searchable Autocomplete field on (potentially) longer selects. Like the Device(s) and Groups in Reports and Groups in the main page/maps filter.
This makes it a lot easier to find and select the options you wish when there is a lot of options. I think it improves the user experience a lot.
This is more or less a draft now, in sense that if this is acceptable I would extend this change to some other Selects (Timezone in User settings, Group in Device settings, Group in Group settings,...)