小编Bes*_*ver的帖子

How to organise a Show layout in React Admin using a Material UI Grid

I've created a number of Show views in a new React-Admin project. Rather than have the fields just form a single column I would like to use Material UI's Grid component to arrange them into a more efficient and helpful layout. Unfortunately this stops React Admin's ...ShowLayout components from rendering the Field components inside them properly.

I was hoping to be able to do something like this:

<Show {...props}>
    <SimpleShowLayout>
        <Grid container>
            <Grid item>
                <TextField source="firstName" />
            </Grid>
            <Grid item> …
Run Code Online (Sandbox Code Playgroud)

material-ui react-admin

5
推荐指数
1
解决办法
270
查看次数

标签 统计

material-ui ×1

react-admin ×1