Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CheckboxGroupInput throws 'Cannot set a numeric property on an object' #4827

Closed
dzmitrypanamarenka opened this issue May 18, 2020 · 2 comments

Comments

@dzmitrypanamarenka
Copy link

What you were expecting:
Normal rendering of checkboxes

What happened instead:

Error: Cannot set a numeric property on an object

Related code:

Choices.js
[ { id: "usb", name: "USB" } ]

DataProvider responce:
{ includedFeatures: ['usb'] }

Edit.jsx
<Edit {...props}>
    <TabbedForm toolbar={<PublishToolbar />}>
      <FormTab label="Data">
        <CheckboxGroupInput source="includedFeatures" choices={choices} />
      </FormTab>
    </TabbedForm>
</Edit>

Environment

  • React-admin version: 3.5.2
  • React-final-form: 6.4.0
  • React version: 16.13.1
  • Browser: Chrome 81.0.4044.138
  • Stack trace (in case of a JS error):
Error: Cannot set a numeric property on an object

    in FormView (created by ReactFinalForm)
    in ReactFinalForm (created by FormWithRedirect)
    in FormWithRedirect (created by TabbedForm)
    in TabbedForm (at Edit.jsx:31)
    in div (created by ForwardRef(Paper))
    in ForwardRef(Paper) (created by WithStyles(ForwardRef(Paper)))
    in WithStyles(ForwardRef(Paper)) (created by ForwardRef(Card))
    in ForwardRef(Card) (created by WithStyles(ForwardRef(Card)))
    in WithStyles(ForwardRef(Card)) (created by EditView)
    in div (created by EditView)
    in div (created by EditView)
    in EditView (created by Edit)
    in Edit (at Edit.jsx:30)
    in CarEdit (created by WithPermissions)
    in WithPermissions (created by Context.Consumer)
    in Route (created by ResourceRoutes)
    in Switch (created by ResourceRoutes)
    in ResourceRoutes (created by Resource)
    in Resource (at App.js:11)
    in Route (created by RoutesWithLayout)
    in Switch (created by RoutesWithLayout)
    in RoutesWithLayout (created by Context.Consumer)
    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 Context.Consumer)
    in withRouter(WithStyles(Layout)) (created by ConnectFunction)
    in ConnectFunction (created by LayoutWithTheme)
    in ThemeProvider (created by LayoutWithTheme)
    in LayoutWithTheme (created by Context.Consumer)
    in Route (created by CoreAdminRouter)
    in Switch (created by CoreAdminRouter)
    in div (created by CoreAdminRouter)
    in CoreAdminRouter (created by Context.Consumer)
    in Route (created by CoreAdminUI)
    in Switch (created by CoreAdminUI)
    in CoreAdminUI (created by AdminUI)
    in AdminUI (created by Admin)
    in Router (created by ConnectedRouter)
    in ConnectedRouter (created by Context.Consumer)
    in ConnectedRouterWithContext (created by ConnectFunction)
    in ConnectFunction (created by CoreAdminContext)
    in TranslationProvider (created by CoreAdminContext)
    in Provider (created by CoreAdminContext)
    in CoreAdminContext (created by AdminContext)
    in AdminContext (created by Admin)
    in Admin (at App.js:9)
    in App (at src/index.js:9)
    in StrictMode (at src/index.js:8)
@djhi
Copy link
Collaborator

djhi commented May 19, 2020

Thanks for reporting this. If you are able to illustrate the bug or feature request with an example, please provide a sample application via one of the following means:

@fzaninotto
Copy link
Member

Duplicate of #4823

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants