Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
JhumanJ committed Dec 15, 2023
1 parent fa20945 commit be891b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"date-fns": "^2.28.0",
"debounce": "^1.2.1",
"fuse.js": "^6.4.6",
"js-cookie": "^2.2.1",
"js-sha256": "^0.9.0",
"libphonenumber-js": "^1.10.44",
"pinia": "^2.1.7",
Expand Down
4 changes: 3 additions & 1 deletion resources/js/components/forms/useFormInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,20 @@ export function useFormInput (props, context, formPrefixKey = null) {
})

const hasError = computed(() => {
return hasValidation && props.form?.errors?.has(name)
return hasValidation && props.form?.errors?.has(props.name)
})

const compVal = computed({
get: () => {
if (props.form) {
console.log(props, 'props')
return props.form[(formPrefixKey || '') + props.name]
}
return content.value
},
set: (val) => {
if (props.form) {
console.log(props, 'props')
props.form[(formPrefixKey || '') + props.name] = val
} else {
content.value = val
Expand Down

0 comments on commit be891b0

Please sign in to comment.