React-admin: Warning: React does not recognize the `fullWidth` prop on a DOM element.

Created on 26 Jun 2018  路  4Comments  路  Source: marmelab/react-admin

What you were expecting:
Show view should have compiled with no warnings.

What happened instead:
The warning keeps appearing.

Steps to reproduce:

  1. Create a new Show with either TabbedShowLayout or SimpleShowLayout.
  2. Create any TextField

Related code:

export const PresetShow = (props) => (
    <Show {...props}>
        <TabbedShowLayout>
            <Tab label="content">
                <TextField source="content" />
            </Tab>
            <Tab label="summary">
                <TextField source="id" />
                <TextField source="title" />
                <TextField source="language" />
                <TextField source="category" />
                <DateField source="date" label="Published at" />
            </Tab>
        </TabbedShowLayout>
    </Show>
);

Environment

  • React-admin version: 2.0.3
  • Last version that did not exhibit the issue (if applicable):
  • React version: 16.4.1
  • Browser: Chrome 67.0.3396.87
  • Stack trace (in case of a JS error):
    Warning: React does not recognize the fullWidth prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase fullwidth instead. If you accidentally passed it from a parent component, remove it from the DOM element.
    in span (created by TextField)
    in TextField (created by pure(TextField))
    in pure(TextField) (at Presets.js:84)
    in div (created by Labeled)
    in div (created by FormControl)
    in FormControl (created by WithStyles(FormControl))
    in WithStyles(FormControl) (created by Labeled)
    in Labeled (created by WithStyles(Labeled))
    in WithStyles(Labeled) (created by Tab)
    in div (created by Tab)
    in span (created by Tab)
    in Tab (created by TranslatedComponent(undefined))
    in TranslatedComponent(undefined) (at Presets.js:83)
    in div (created by TabbedShowLayout)
    in div (created by TabbedShowLayout)
    in TabbedShowLayout (created by WithStyles(TabbedShowLayout))
    in WithStyles(TabbedShowLayout) (at Presets.js:82)
    in div (created by Paper)
    in Paper (created by WithStyles(Paper))
    in WithStyles(Paper) (created by Card)
    in Card (created by WithStyles(Card))
    in WithStyles(Card) (created by ShowView)
    in div (created by ShowView)
    in ShowView (created by ShowController)
    in ShowController (created by TranslatedComponent(undefined))
    in TranslatedComponent(undefined) (created by Connect(TranslatedComponent(undefined)))
    in Connect(TranslatedComponent(undefined)) (created by Show)
    in Show (at Presets.js:81)
    in PresetShow (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:13)
    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 Connect(WithStyles(Layout)))
    in Connect(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:12)
    in App (at index.js:7)
bug

Most helpful comment

index.js:1375 Warning: React does not recognize the fullWidth prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase fullwidth instead. If you accidentally passed it from a parent component, remove it from the DOM element.

What must I do here? It was working before without error.

All 4 comments

This warning still exists when using something as simple as:

<Show>
    <SimpleShowLayout>
        <TextField source="title" />
    </SimpleShowLayout>
</Show>

Yes, because the fix has not been released yet. It will be 2.0.4

index.js:1375 Warning: React does not recognize the fullWidth prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase fullwidth instead. If you accidentally passed it from a parent component, remove it from the DOM element.

What must I do here? It was working before without error.

@besiwims Commenting on a closed issue from 2018 isn't the best way to get help. Try StackOverflow for troubleshooting.

Was this page helpful?
0 / 5 - 0 ratings