Skip to content

Commit

Permalink
Update page generator to mark enum options as optional.
Browse files Browse the repository at this point in the history
  • Loading branch information
rizen committed Apr 9, 2024
1 parent b2060f3 commit dcaa5b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/change-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ outline: deep
* Added a whole new section to the Ving Schema documentation defining all the fields that go into ving schema props.
* Added UserProfileLink component.
* Automatically link id/name in generated index pages.
* Update page generator to mark enum options as optional.

## 2024-04-07
* Made the MenuBar in the default layout client only until PrimeVue fixes #5541.
Expand Down
2 changes: 1 addition & 1 deletion ving/generator/nuxtpages.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ const editProps = (schema) => {
if (['enum', 'boolean'].includes(prop.type)) {
out += `
<div class="mb-4">
<FormSelect name="${prop.name}" :options="${schema.kind.toLowerCase()}.options.${prop.name}" v-model="${schema.kind.toLowerCase()}.props.${prop.name}" label="${makeLabel(prop.name)}" @change="${schema.kind.toLowerCase()}.update()" />
<FormSelect name="${prop.name}" :options="${schema.kind.toLowerCase()}.options?.${prop.name}" v-model="${schema.kind.toLowerCase()}.props.${prop.name}" label="${makeLabel(prop.name)}" @change="${schema.kind.toLowerCase()}.update()" />
</div>`;
}
else if (prop.type != 'virtual') {
Expand Down

0 comments on commit dcaa5b8

Please sign in to comment.