How to create a ReferenceInput wrapped component?

前端 未结 2 615
野的像风
野的像风 2021-01-25 16:10

I\'m trying to create a wrap component that includes admin-on-rest ReferenceInput

What am I missing?

I have seen the answer Error on Creating custom ReferenceIn

2条回答
  •  礼貌的吻别
    2021-01-25 17:06

    is question actual now? Some time ago I divided component this way:

    1) create file DescriptionField.js

    2) write code into it

    import React from 'react';
    export const DescriptionField = ({ source = "Description" }) => 

    {source}

    ; export default DescriptionField;

    (maybe it can be simple). Maybe you forgot export ?

    3) and in parent component call it:

    export const SomeMyCreate = (props) => (
      
        
          .....
          
        
      
    );
    

    You can try to do it the same method. Please write your code Prueba component file here

提交回复
热议问题