@koumoul/vjsf 3.15.4 → 3.15.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/compat/v2.js +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koumoul/vjsf",
3
- "version": "3.15.4",
3
+ "version": "3.15.5",
4
4
  "description": "Generate forms for the vuetify UI library (vuejs) based on annotated JSON schemas.",
5
5
  "scripts": {
6
6
  "test": "vitest run",
package/src/compat/v2.js CHANGED
@@ -138,7 +138,7 @@ const processFragment = (schema, getJSONRef, schemaId, processed) => {
138
138
  }
139
139
 
140
140
  if (schema['x-fromUrl']) {
141
- /** @type string */
141
+ layout.comp = layout.comp ?? 'select'
142
142
  const url = schema['x-fromUrl']
143
143
  layout.getItems = { url: fixExpression(url, 'js-tpl') }
144
144
  delete schema['x-fromUrl']
@@ -163,7 +163,7 @@ const processFragment = (schema, getJSONRef, schemaId, processed) => {
163
163
  layout.if = '!summary'
164
164
  }
165
165
 
166
- if (schema.type === 'array' && schema.items) {
166
+ if (schema.type === 'array' && schema.items && !layout.getItems) {
167
167
  if (!Array.isArray(schema.items)) {
168
168
  layout.comp = 'list'
169
169
  if (schema['x-itemTitle']) layout.itemTitle = `data["${schema['x-itemTitle']}"]`