Closed mzazrivec closed 4 years ago
This will also cause selects to have no default value by default. Is that intended?
(I believe "selects default to the first option" was a feature at some point, but I'm OK to see it go away.)
@himdel This is what dropdown would look like with my change
Dropdown without a default value would render <None>
as a default choice, dropdown with a default value would render the default value. That I believe is the correct behavior here. I studied the code a bit, but wasn't able to coprehend why would we want to always set a default value.
Yes, I agree, as long as that's intentional.. :)
The "preselect the first option if none selected" logic never made much sense to me either.
Ivanchuk backport details:
$ git log -1
commit ed77da4b7e0d24236a98b9b5ba8c27cd0a206411
Author: Martin Hradil <mhradil@redhat.com>
Date: Thu Jun 18 14:22:57 2020 +0000
Merge pull request #442 from mzazrivec/dont_set_default_value_when_not_needed
Don't set default value for non-applicable fields
(cherry picked from commit d21e49168fa8ef7cc0702c6cfbc29d9f342e560a)
https://bugzilla.redhat.com/show_bug.cgi?id=1713212
Jansa backport details:
$ git log -1
commit c5c74d88996227691182562073d802a4245acd23
Author: Martin Hradil <mhradil@redhat.com>
Date: Thu Jun 18 14:22:57 2020 +0000
Merge pull request #442 from mzazrivec/dont_set_default_value_when_not_needed
Don't set default value for non-applicable fields
(cherry picked from commit d21e49168fa8ef7cc0702c6cfbc29d9f342e560a)
Without this fix, the field with no default value would always default to the first choice.
With this fix in place, the no default value is being honored.
https://bugzilla.redhat.com/show_bug.cgi?id=1713212