Skip to content

Commit

Permalink
Merge pull request jsonform#234 from elibus/fix-issue-232
Browse files Browse the repository at this point in the history
Fix issue jsonform#232 - multiselect checkboxes do not work with tabarray
  • Loading branch information
tchapi authored May 21, 2019
2 parents 90423cf + b9c8322 commit 1042794
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lib/jsonform.js
Original file line number Diff line number Diff line change
Expand Up @@ -826,9 +826,15 @@ jsonform.elementTypes = {
'<input type="checkbox" <% if (value) { %> checked="checked" <% } %> name="<%= name %>" value="1"' +
'<%= (node.disabled? " disabled" : "")%>' +
'/><%= title %></label></div>';
if (!node || !node.schemaElement || !node.schemaElement.items) return;
choices = node.schemaElement.items['enum'] ||
node.schemaElement.items[0]['enum'];
if (!node || !node.schemaElement) return;

if (node.schemaElement.items) {
choices =
node.schemaElement.items["enum"] ||
node.schemaElement.items[0]["enum"];
} else {
choices = node.schemaElement["enum"];
}
if (!choices) return;

choiceshtml = '';
Expand Down

0 comments on commit 1042794

Please sign in to comment.