React-admin: ReferenceArrayInput + SelectArrayInput doesn鈥檛 work properly

Created on 2 Oct 2017  路  2Comments  路  Source: marmelab/react-admin

Hello,
ReferenceArrayInput + SelectArrayInput finds the relations but the select element does not work
(see the gif)
aor2

from my package.json

    "admin-on-rest": "^1.3.1",
    "aor-firebase-client": "0.0.10",
    "react": "^16.0.0",
    "react-dom": "^16.0.0",
    "react-scripts": "1.0.13"

from Room.js

export const RoomEdit = (props) => (
    <Edit title={<RoomTitle />} {...props}>
      <SimpleForm>
        <DisabledInput source="id" />
        <TextInput source="name" />
        <LongTextInput source="description" />
        <ReferenceArrayInput label="Insegnanti" source="users" reference="profile" allowEmpty>
          <SelectArrayInput optionText="name" optionValue="id" />
        </ReferenceArrayInput>
      </SimpleForm>
    </Edit>
);

It's a bug, or... what did I miss?
thanks
F.

Most helpful comment

thanks @Phocea for your feedback,
Investigating on versions of dependencies and changing the package as below, i've resolved

"dependencies": {
    "admin-on-rest": "^1.3.1",
    "react": "^15",
    "react-dom": "^15.3.2",
    "react-scripts": "^1.0.14"
  },

It seems that there鈥檙e issues with react v.16
Close the issue. This is not a strictly issue of AOR but I hope this help someone else to save time.

All 2 comments

I have a similar setup using 1.3.1 and cannot reproduce your problem...

export const UserEdit = (props) => (
    <Edit title={<UserTitle />} {...props}>
      <SimpleForm>
        <DisabledInput source="id"/>
        <TextInput source="login" validate={required}/>
        <TextInput source="password" type="password" validate={required}/>
        <ReferenceArrayInput source="roleIdList" reference="roles" allowEmpty sort={{ field: 'name', order: 'ASC' }}>
          <SelectArrayInput optionText="name" />
        </ReferenceArrayInput>
        <DateField source="creationDate" label="resources.common.edit.creation_date" showTime/>
        <DateField source="lastModificationDate" label="resources.common.edit.modification_date" showTime/>
      </SimpleForm>
    </Edit>
);

2017-10-02_12-01-00

thanks @Phocea for your feedback,
Investigating on versions of dependencies and changing the package as below, i've resolved

"dependencies": {
    "admin-on-rest": "^1.3.1",
    "react": "^15",
    "react-dom": "^15.3.2",
    "react-scripts": "^1.0.14"
  },

It seems that there鈥檙e issues with react v.16
Close the issue. This is not a strictly issue of AOR but I hope this help someone else to save time.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Kmaschta picture Kmaschta  路  3Comments

Dragomir-Ivanov picture Dragomir-Ivanov  路  3Comments

marknelissen picture marknelissen  路  3Comments

nicgirault picture nicgirault  路  3Comments

9747749366 picture 9747749366  路  3Comments