-
Notifications
You must be signed in to change notification settings - Fork 34
Closed
Description
- Laravel Version: 9.11
- Nova Version: 4.10.0
- PHP Version: 8.1.3
Description:
HasOne does not support nested keys.
As a result, it is not possible to read the value on the server-side.
The keys are generated in the file resources/js/fields/Form/HasOneField.vue, but there is no nesting check here.
Solution
entries.forEach((data, attribute) => {
var attribute_key = `[${attribute}]`
if (attribute.includes('[')) {
let pos = attribute.indexOf('[')
let key = attribute.substr(0, pos)
let nested = attribute.substr(pos)
attribute_key = `[${key}]${nested}`
}
this.fillIfVisible(
formData,
this.field.attribute+attribute_key,
data || ''
)
})
Metadata
Metadata
Assignees
Labels
No labels


