react-admin icon indicating copy to clipboard operation
react-admin copied to clipboard

Show is throwing an error in new version 2.4.0

Open TomJannes opened this issue 8 years ago • 1 comments

Show is throwing errors in new version What you were expecting: Show not throwing an error

What happened instead: Following error was thrown: Warning: Failed prop type: Invalid prop classes supplied to Show, expected a ReactNode. in Show (created by WithStyles(Show)) in WithStyles(Show) (at posts.jsx:48) in PostShow (created by WithPermissions) in WithPermissions (created by Connect(WithPermissions)) in Connect(WithPermissions) (created by getContext(Connect(WithPermissions))) in getContext(Connect(WithPermissions)) (created by Route) in Route (created by Resource) in Switch (created by Resource) in Resource (created by Connect(Resource)) in Connect(Resource) (at App.js:10) in Route (created by RoutesWithLayout) in Switch (created by RoutesWithLayout) in RoutesWithLayout (created by Route) in div (created by Layout) in main (created by Layout) in div (created by Layout) in div (created by Layout) in Layout (created by WithStyles(Layout)) in WithStyles(Layout) (created by Route) in Route (created by withRouter(WithStyles(Layout))) in withRouter(WithStyles(Layout)) (created by Connect(withRouter(WithStyles(Layout)))) in Connect(withRouter(WithStyles(Layout))) (created by LayoutWithTheme) in MuiThemeProvider (created by LayoutWithTheme) in LayoutWithTheme (created by Route) in Route (created by CoreAdminRouter) in Switch (created by CoreAdminRouter) in div (created by CoreAdminRouter) in CoreAdminRouter (created by Connect(CoreAdminRouter)) in Connect(CoreAdminRouter) (created by getContext(Connect(CoreAdminRouter))) in getContext(Connect(CoreAdminRouter)) (created by Route) in Route (created by CoreAdmin) in Switch (created by CoreAdmin) in Router (created by ConnectedRouter) in ConnectedRouter (created by CoreAdmin) in TranslationProvider (created by withContext(TranslationProvider)) in withContext(TranslationProvider) (created by Connect(withContext(TranslationProvider))) in Connect(withContext(TranslationProvider)) (created by CoreAdmin) in Provider (created by CoreAdmin) in CoreAdmin (created by withContext(CoreAdmin)) in withContext(CoreAdmin) (at App.js:9) in App (at src/index.js:7)

Steps to reproduce: export const PostShow = (props) => ( <Show {...props}> <SimpleShowLayout> <TextField source="title" /> </SimpleShowLayout> </Show> );

Environment

  • React-admin version: 2.4.0
  • Last version that did not exhibit the issue (if applicable): 2.3
  • React version: 16.5.2
  • Browser: chrome

TomJannes avatar Oct 17 '18 19:10 TomJannes

Bug confirmed and reproduced. It's just a warning, though.

fzaninotto avatar Oct 18 '18 06:10 fzaninotto