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

[4.4]: UX issues with 'selectize' dropdown fields #12880

Closed
wsydney76 opened this issue Mar 13, 2023 · 2 comments
Closed

[4.4]: UX issues with 'selectize' dropdown fields #12880

wsydney76 opened this issue Mar 13, 2023 · 2 comments
Assignees

Comments

@wsydney76
Copy link

What happened?

Description

While we get the benefits of using selectize for long value lists, it causes serious UX problems for standard use cases, mostly around handling 'empty' values.

A) Option with empty value

Configured with one option with an empty value :

image

The dropdown does not show this value:

image

The 'None' option gets only visible when focusing the input field and hit the 'backspace' key, which is terrible UX.

image

B) No option with empty value

Typing random text into the input field and saving causes the field to have an empty value. With a standard select HTML field this would not be possible and therefore these fields are usually not marked as 'required'. Now they have to in order to avoid invalid data. To be severe for once, I would consider this to be a breaking change, as it forces everybody to check/update all field usages.

Steps to reproduce

See above.

Expected behavior

Like in good old times.

No idea how selectize can be customized to fix these issues, however, I would prefer a field setting whether to use selectize or not.

Actual behavior

See above.

/Mel

Craft CMS version

4.4.1

PHP version

8.1.13

Operating system and version

Linux 5.15.90.1-microsoft-standard-WSL2

Database type and version

MySQL 10.4.27

Image driver and version

Imagick 3.7.0 (ImageMagick 6.9.11-60)

Installed plugins and versions

@brandonkelly
Copy link
Member

Both of those issues are fixed now, for the next release!

Typing random text into the input field and saving causes the field to have an empty value.

I couldn’t find a way to configure Selectize to prevent this, so instead I addressed this on the validation end. Dropdown fields that are saved within the control panel no longer allow blank values, unless one of the options has a blank value as well.

@brandonkelly
Copy link
Member

4.4.2 is out with those changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants