-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix: Deal with DataObjects or Int values #214
Conversation
…s shown with has_one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the concern that there may not be a title field is valid - this should fallback on the ID if no title field is available. Need a $values->hasField()
check.
I still can't get the value to display in the field - can you please include some instructions for how to set this up?
with the private static $has_one = [
'BlogTag' => BlogTag::class
]; |
Hi @GuySartorelli
|
Ahh okay. That makes sense. Can you please add that to the readme? Create a new section below "Relational Tags" |
@GuySartorelli done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Works well.
The requested changes were made
This PR fixes an issue with
has_one
relations and the TagField. Creating and updating works, but the value is not shown in the Field. I tested with #195, but this didn't solve the issue.With this patch it's possible to use the
TagField
withisMultiple = false
andhas_one
relations. Tested with Pages as well as inline editing via Gridfieldextensions.