Search code examples
datagridmultiple-columnsreact-admin

Is it possible to have ShowButton and EditButton in one column in Datagrid of react-admin?


Simple question, I am using react-admin and I am developing a list view of some data.

      <DatagridConfigurable preferenceKey="userList">
        <TextField source="email" />
        <TextField source="firstName" />
        <TextField source="lastName" />
      
        <ShowButton />
        <EditButton />
      </DatagridConfigurable>

Currently ShowButton and EditButton are displayed in two different columns. In the example listed by react-admin documentation it seems that those two buttons are in one column. But I could not find in the documentation how to do that. Is it possible somehow? Thanks in advance.


Solution

  • Try like this:

    <>
      <ShowButton />
      <EditButton />
    </>