How to use the react-admin.linkToRecord function in react-admin

To help you get started, we’ve selected a few react-admin examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sony / nmos-js / Development / src / pages / receivers / ReceiversShow.js View on Github external
{data.map(item => (
                                
                                    
                                        {
                                            // Using linkToRecord as ReferenceField will
                                            // make a new unnecessary network request
                                        }
                                        
                                            
                                        
                                    
                                    {QueryVersion() >= 'v1.2' && (
                                        
github navidrome / navidrome / ui / src / album / AlbumGridView.js View on Github external
}
          actionIcon={}
        />
      
      
        {record.name}
      
      {showArtist ? (
        
      ) : (
        
      )}
    
  )
github mgm-interns / team-radio / admin / src / resources / stations / StationList.tsx View on Github external
render={(record: any) =>
          Authorization.isStationOwner(props.permissions, record.id) && (
            <button color="primary">
              
              Edit
            </button>
          )
        }
github navidrome / navidrome / ui / src / common / SimpleList.js View on Github external
const LinkOrNot = ({
  classes: classesOverride,
  linkType,
  basePath,
  id,
  record,
  children,
}) =&gt; {
  const classes = useStyles({ classes: classesOverride })
  return linkType === 'edit' || linkType === true ? (
    
      {children}
    
  ) : linkType === 'show' ? (
    
      {children}
    
  ) : typeof linkType === 'function' ? (
    <span> linkType(id, basePath, record)}&gt;{children}</span>
  ) : (
    <span>{children}</span>
  )
}
github marmelab / react-admin / examples / demo / src / visitors / Aside.js View on Github external
const EditButton = ({ record, basePath }) =&gt; {
    const translate = useTranslate();
    return (
        
            
                
            
        
    );
};