Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle cases where there is no owner #148

Closed
emteknetnz opened this issue Dec 20, 2023 · 2 comments
Closed

Handle cases where there is no owner #148

emteknetnz opened this issue Dec 20, 2023 · 2 comments
Assignees

Comments

@emteknetnz
Copy link
Member

emteknetnz commented Dec 20, 2023

As part of saving the relation between an Owner and Link on Link creation you can get into a state where the Owner has yet to be saved, such as creating a new Owner on a GridField.

In these instances, it probably makes sense to not render the LinkField component normally, and instead have a message in the LinkField along the lines of "Save the Owner first"

We can simply check to see if the ownerID prop in the LinkField component is 0 or not as a condition for showing the message

PR

@emteknetnz emteknetnz changed the title Handle Handle cases where there is no owner Dec 21, 2023
@GuySartorelli
Copy link
Member

GuySartorelli commented Dec 21, 2023

@emteknetnz Did you mean to open this in the linkfield repo?
I'll migrate it there

@GuySartorelli GuySartorelli transferred this issue from silverstripe/.github Dec 21, 2023
@emteknetnz emteknetnz self-assigned this Jan 9, 2024
@emteknetnz emteknetnz removed their assignment Jan 9, 2024
@GuySartorelli
Copy link
Member

PR merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants