diff --git a/packages/form/package.json b/packages/form/package.json index eb80edd..492c8e1 100644 --- a/packages/form/package.json +++ b/packages/form/package.json @@ -1,7 +1,7 @@ { "name": "schemastery-vue", "description": "Type driven schema validator", - "version": "7.3.6", + "version": "7.3.7", "main": "src/index.ts", "files": [ "src" diff --git a/packages/form/src/schema.vue b/packages/form/src/schema.vue index c15fbe8..e127aa9 100644 --- a/packages/form/src/schema.vue +++ b/packages/form/src/schema.vue @@ -171,7 +171,7 @@ const SchemaComponent = computed(() => { const valid = isNullable(props.modelValue) && !ext.important || ext.validate(props.modelValue, props.schema) if (!valid) return } - return [ext.component, +!!ext.type + +!!ext.role + +ext.important * Infinity] as const + return [ext.component, +!!ext.type + +!!ext.role + (ext.important ? Infinity : 0)] as const }).filter(Boolean).sort((a, b) => b[1] - a[1]) candidates.push([SchemaBase, 0]) return candidates[0][0] diff --git a/packages/form/src/styles/index.scss b/packages/form/src/styles/index.scss index 45c17ed..997c8f2 100644 --- a/packages/form/src/styles/index.scss +++ b/packages/form/src/styles/index.scss @@ -1,4 +1,4 @@ -@import './menu.scss'; +@use './menu.scss'; .k-schema-item { position: relative;