I am using react-admin
for my application. I want to create a searchable(suggesting with possible values) multi-select field input which fetches data(feature name in my case from table features) which can be selected from a table at the backend. My current code looks like this:
`
export default class ModelCreate extends React.Component<any, any> {
return (
<Create title="Create a Model" {...this.props}>
<SimpleForm className="model-container" toolbar={<ModelCreateToolbar />}>
<SelectInput
source="group"
label="Group"
choices={GROUP}
optionText="name"
optionValue="group"
style={styles}
validate={validateField}
required
/>
<ReferenceArrayInput source="id" reference="features">
<SelectArrayInput source="name" reference="features" label="feature" required />
</ReferenceArrayInput>
</SimpleForm>
</Create>
);
}
}
`
In this code feature
is my table name which has entries of id and name.
P.S: I'm using typescript
.