Option widget has extra blank entry

Just testing upgrade to v4.1.4, but I’m not sure if this was also present in previous versions / I’m doing something wrong.

I’ve got a form definition like this:

    gres:
        help: Select GPU or other Slurm GRES resources
        label: Resources
        options:
          - ["A thing", "foo"]
          - ["None", "none"]
        required: true
        widget: select

but I get an extra blank line first in the resulting widget:

is that expected?

[edit: note the “Count of …” line in the screenshot above is actually from the next widget, looks confusing here but that’s fine]

That is not expected and I can replicate on OSC production running 4.1.3. It appears to be a bug with the bootstrap_form gem, and I don’t think the required attribute is supported by select widgets.

Just thinking about it, I am not sure what the expected behavior would even be, as required is typically passed to a text box to ensure that text box is not blank. Default select widgets already do not have a blank option, so it will always have a value at any given point. If I had to guess what the issue is, it would be that you can pass required: false to a select to add that extra option, and they likely check presence instead of reading the value.

Removing the required flag should fix this, unless there is behavior that you want that I am missing