How do I have more complex layouts in `react-admin` “Show” and “Edit” and “Create” screens?

前端 未结 1 1654
甜味超标
甜味超标 2020-12-18 16:36

I\'m trying to build on react-admin. The base structure is this:


  
    
           


        
相关标签:
1条回答
  • 2020-12-18 17:36

    We need to update our documentation about this. We recently decoupled components with logic, that we name XXXController (ListController, CreateController, etc) in the ra-core package and UI components (List, Create, etc) in the ra-ui-materialui package which the controllers.

    Think about the react-admin package as a distribution of react-admin with material-ui UI. When heavy customization is needed, you can use the controllers directly.

    For now, you'll have to explore the source code to fully understand how to use them.

    Here's an example:

    import { ShowController, ShowView, SimpleShowLayout, TextField } from 'react-admin';
    
    const UserShow = props => (
        <ShowController {...props}>
            {controllerProps => 
                // You're on your own here
            }
        </ShowController>
    );
    
    0 讨论(0)
提交回复
热议问题