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

ReferenceInput: accept function as linkType prop #2288

Closed
jheiska opened this issue Sep 7, 2018 · 3 comments
Closed

ReferenceInput: accept function as linkType prop #2288

jheiska opened this issue Sep 7, 2018 · 3 comments

Comments

@jheiska
Copy link

jheiska commented Sep 7, 2018

Everything in my DB is related to a specific building. I have multiple tabs in BuildingShow-view showing different kinds of information, and I'd like to be able to link directly to the appropriate tab from the List views of these Resources.

Describe the solution you'd like
I'd like to be able to define the tab a ReferenceField links to. For example, from my "AlertsList" I could include a linkTab="alerts" -option:

<ReferenceField
    label="building"
    reference="buildings"
    source="BuildingId"
    linkType="show"
    linkTab="alerts"
>
    <TextField source="BuildingName" />
</ReferenceField>

I could write my own Field component and define the link there. I just thought this would be a neat feature now that we have the possibility to link to specific tabs.

@Kmaschta Kmaschta changed the title Feature request: Link to a specific tab from ReferenceInput Link to a specific tab from ReferenceInput Sep 7, 2018
@fzaninotto
Copy link
Member

In fact, it would be a good idea to accept a function as linkType prop, just like we accept a function as redirect prop in forms.

@jheiska
Copy link
Author

jheiska commented Sep 10, 2018

Yes, that would be really good and way more versatile.

@fzaninotto fzaninotto changed the title Link to a specific tab from ReferenceInput ReferenceInput: accept function as linkType prop Sep 10, 2018
@fzaninotto
Copy link
Member

Fixed by #3282

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

4 participants