React-admin: Set initial active FormTab component

Created on 14 Aug 2020  路  3Comments  路  Source: marmelab/react-admin

Currently, there is no practical way of choosing a particular <FormTab/> component (within a <TabbedForm/> component) as the active one.

Describe the solution you'd like
Maybe a <TabbedForm/> prop initialSelectedIndex

enhancement needs more info

Most helpful comment

Sorry, I've forgotten about this one.
I tried redirecting and I end up in a situation where the tab became active but not the view associated with it somehow.
That lead me to believe there wasn't an easy way to initiate a particular tab.

Since I can't reproduce the bug again, this can be closed.

All 3 comments

I think it's possible using the URL. If you need to open a specific <Tab>, you can change its link. For example, the link /artists/{id}/1 will target the second tab.

We can still add a prop. But maybe it's overkill and it leads to more maintenance.

Sorry, I've forgotten about this one.
I tried redirecting and I end up in a situation where the tab became active but not the view associated with it somehow.
That lead me to believe there wasn't an easy way to initiate a particular tab.

Since I can't reproduce the bug again, this can be closed.

Besides, if you don't like the numeric tab, you can give each tab a path

Was this page helpful?
0 / 5 - 0 ratings

Related issues

9747749366 picture 9747749366  路  3Comments

marknelissen picture marknelissen  路  3Comments

ericwb picture ericwb  路  3Comments

mbj36 picture mbj36  路  3Comments

pixelscripter picture pixelscripter  路  3Comments