Skip to content

Commit

Permalink
fix(registrar): return empty value if no option selected in selectbox
Browse files Browse the repository at this point in the history
- Previously generic "--- Not selected ---" option in the select box returned
  "null" string value.
- Now we return empty string which is correctly recognized as an empty/null
  value for the attribute on Perun side.
- This prevents bug when such value should be stored in attribute
  with checked syntax.
  • Loading branch information
zlamalp committed May 23, 2022
1 parent da7dfc2 commit cdc8ff0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected Widget initWidget() {
getSelect().clear();

if (!isRequired()) {
getSelect().addItem(translation.notSelected(), (String) null);
getSelect().addItem(translation.notSelected(), "");
}

Map<String, String> opts = parseItemOptions();
Expand Down

0 comments on commit cdc8ff0

Please sign in to comment.