Skip to content

Commit

Permalink
fix: remove console log error because missing ref for RefInput (#4658)
Browse files Browse the repository at this point in the history
fix: missing ref for RefInput

this allows the form to call the field validation
  • Loading branch information
mswertz authored Jan 31, 2025
1 parent 955c11e commit 9d81822
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions apps/tailwind-components/components/form/FieldInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ function validate(value: columnValue) {
<LazyInputRef
v-else-if="type === 'REF_ARRAY' || type === 'REF'"
:id="id"
ref="input"
:modelValue="data as columnValueObject | columnValueObject[]"
:refSchemaId="refSchemaId as string"
:refTableId="refTableId as string"
Expand Down
2 changes: 1 addition & 1 deletion apps/tailwind-components/components/input/Ref.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const hasNoResults = ref<boolean>(true);
defineExpose({ validate });
function validate(value: columnValue) {
if (props.required && !modelValue.value) {
if (props.required && !value) {
const errors = [
{ message: `${props.label || props.id} required to complete the form` },
];
Expand Down

0 comments on commit 9d81822

Please sign in to comment.