Choices-js/Choices

[v11] possible regression: "noChoicesText" not appearing

Closed this issue · 4 comments

Describe the bug
Hello, I've tried to figure out if there was a breaking change but I couldn't find it

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://jsfiddle.net/tagliala/rx8mtbz6/6 Based on Choices 11
  2. Click on the input field
  3. noChoicesText does not Appear

On v10.2, the field appears: https://jsfiddle.net/tagliala/rx8mtbz6/9

NOTE: Even if in the readme states that this feature is only available with select-multiple, I think it is a problem in the documentation, because it worked also on select-one. Also, on v11 does not work on both select-single and select-multiple

Ref: https://github.com/Choices-js/Choices/tree/v10.2.0?tab=readme-ov-file#nochoicestext

Expected behavior
See "Hello World"

Screenshots

v10

image

v11

image

Choices version and bundle

  • Version: 11.0.1

Desktop (please complete the following information):

  • OS: macOS
  • Browser Chrome / Firefox
  • Version 128.0.6613.114 / 129.0.2 (64 bit)
Xon commented

How "no choices" (and other notices) where displayed where overhauled, and it looks like this case was missed.

The e2e test suit only tested this with select-multiple, so it is likely it was missed for select-single.

Xon commented

I've added some more end-to-end tests to cover this, and adjusted how the noChoicesText option is used.

There was another regression in that disabled choices where considered selectable for this option. This does mean if all the choices are disabled it'll show the noChoicesText option but I think that is acceptable.

Xon commented

I've merged in #1187 which fixes this. This will likely be released towards the end of next week

Thanks, this new release fixed a lot of issues we were having and we could remove a lot of workarounds