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

<DatagridConfigurable> ignores children without label #8366

Closed
fzaninotto opened this issue Nov 7, 2022 · 0 comments · Fixed by #8376
Closed

<DatagridConfigurable> ignores children without label #8366

fzaninotto opened this issue Nov 7, 2022 · 0 comments · Fixed by #8376
Labels

Comments

@fzaninotto
Copy link
Member

fzaninotto commented Nov 7, 2022

What you were expecting:

All children of <DatagridConfigurable> are shown by default

What happened instead:

Only children with a label prop appear. Therefore, actions columns are hidden.

Steps to reproduce:

Create a DatagridConfigurable using <EditButton> as a child:

<DatagridConfigurable>
    <TextField source="id" />
    <TextField source="title" label="Original title" />
    <TextField source="author" />
    <TextField source="year" />
    <EditButton />
</DatagridConfigurable>

The last column doesn't appear, and the editor ignores it, too.

image

Workaround:

Give the <EditButton> a label.

<DatagridConfigurable>
    <TextField source="id" />
    <TextField source="title" label="Original title" />
    <TextField source="author" />
    <TextField source="year" />
-   <EditButton />
+   <EditButton label="Actions" />
</DatagridConfigurable>

image

Environment

  • React-admin version: 4.5.0
  • Last version that did not exhibit the issue (if applicable): N/A
  • React version: 17
  • Browser: Chrome
@fzaninotto fzaninotto added the bug label Nov 7, 2022
@fzaninotto fzaninotto changed the title DatagridConfigurable doesn't allow children without label <DatagridConfigurable> doesn't allow children without label Nov 7, 2022
@fzaninotto fzaninotto changed the title <DatagridConfigurable> doesn't allow children without label <DatagridConfigurable> ignores children without label Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant