Skip to content

Commit

Permalink
enum values in schema.json vs schema.ui.json (GetDKAN#4041)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-korn committed Oct 23, 2023
1 parent a148554 commit 0b721a0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/json_form_widget/src/WidgetRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,9 @@ public function handleListElement($spec, array $element) {
*/
public function getDropdownElement($element, $spec, $titleProperty = FALSE) {
$element['#type'] = $this->getSelectType($spec);
$element['#options'] = $this->getDropdownOptions($spec->source, $titleProperty);
if ($spec->source) {
$element['#options'] = $this->getDropdownOptions($spec->source, $titleProperty);
}
if ($element['#type'] === 'select_or_other_select') {
$element = $this->handleSelectOtherDefaultValue($element, $element['#options']);
$element['#input_type'] = isset($spec->other_type) ? $spec->other_type : 'textfield';
Expand Down

0 comments on commit 0b721a0

Please sign in to comment.