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

The relationship link doesn't appear when field is Readonly #13201

Closed
abdonrd opened this issue May 10, 2022 · 4 comments · Fixed by #13207
Closed

The relationship link doesn't appear when field is Readonly #13201

abdonrd opened this issue May 10, 2022 · 4 comments · Fixed by #13207

Comments

@abdonrd
Copy link
Contributor

abdonrd commented May 10, 2022

Describe the Bug

The relationship link doesn't appear when field is Readonly.

Read only:
Screen Shot 2022-05-10 at 10 09 23

Non-Readonly:
Screen Shot 2022-05-10 at 10 10 05

We expect to have the link to the relationship.

To Reproduce

Set one relationship field to Readonly:

Screen Shot 2022-05-10 at 10 09 52

Errors Shown

No response

What version of Directus are you using?

9.10.0

What version of Node.js are you using?

16.15.0

What database are you using?

Postgres 14

What browser are you using?

Chrome

How are you deploying Directus?

Running locally

@azrikahar
Copy link
Contributor

Seems like technically this is the same M2O behavior prior to the relational rework (I thought it was an unintended bug introduced after that). For O2M, we can't view them either when it's readonly.

I believe it's due to the "link" is really more of an edit button (at least in it's current form) rather than being able to act as "preview". I'll defer to @rijkvanzanten on the intended interaction here, as well as should this be propagated to other relational interfaces.

@benhaynes
Copy link
Sponsor Member

An interesting question! IMO, the ideal solution would be to have an option to support a ?readonly parameter when opening the relational item's drawer so we can open those items in a forced readonly mode so no edits are staged.

@rijkvanzanten
Copy link
Member

An interesting question! IMO, the ideal solution would be to have an option to support a ?readonly parameter when opening the relational item's drawer so we can open those items in a forced readonly mode so no edits are staged.

The launch icon opens a drawer with the item rather than open the related item, so there is no url nor query params 👍🏻 That being said, the drawer-item that's rendered would have a disabled property to force it's v-form to be readonly

@benhaynes
Copy link
Sponsor Member

Haha, that's what I meant... 😉

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

Successfully merging a pull request may close this issue.

4 participants