You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`choices`| Optional |`Object[]`| - | List of items to show as options. Required unless inside a ReferenceArray Input. |
67
-
|`create`| Optional |`Element`| - | A React Element to render when users want to create a new choice |
68
-
|`createLabel`| Optional |`string`|`ra.action. create`| The label for the menu item allowing users to create a new choice. Used when the filter is empty |
69
-
|`disableValue`| Optional |`string`| 'disabled' | The custom field name used in `choices` to disable some choices |
70
-
|`onCreate`| Optional |`Function`| - | A function called with the current filter value when users choose to create a new choice. |
71
-
|`options`| Optional |`Object`| - | Props to pass to the underlying `<SelectInput>` element |
72
-
|`optionText`| Optional |`string`|`Function`|`name`| Field name of record to display in the suggestion item or function which accepts the current record as argument (`record => {string}`) |
73
-
|`optionValue`| Optional |`string`|`id`| Field name of record containing the value to use as input value |
74
-
|`translateChoice`| Optional |`boolean`|`true`| Whether the choices should be translated |
|`choices`| Optional |`Object[]`| - | List of items to show as options. Required unless inside a ReferenceArray Input. |
67
+
|`create`| Optional |`Element`| - | A React Element to render when users want to create a new choice |
68
+
|`createLabel`| Optional |`string`|`ra.action. create`| The label for the menu item allowing users to create a new choice. Used when the filter is empty |
69
+
|`disableValue`| Optional |`string`| 'disabled' | The custom field name used in `choices` to disable some choices |
70
+
|`InputLabelProps`| Optional |`Object`| - | Props to pass to the underlying `<InputLabel>` element |
71
+
|`onCreate`| Optional |`Function`| - | A function called with the current filter value when users choose to create a new choice. |
72
+
|`options`| Optional |`Object`| - | Props to pass to the underlying `<SelectInput>` element |
73
+
|`optionText`| Optional |`string`|`Function`|`name`| Field name of record to display in the suggestion item or function which accepts the current record as argument (`record => {string}`) |
74
+
|`optionValue`| Optional |`string`|`id`| Field name of record containing the value to use as input value |
75
+
|`translateChoice`| Optional |`boolean`|`true`| Whether the choices should be translated |
75
76
76
77
`<SelectArrayInput>` also accepts the [common input props](./Inputs.md#common-input-props).
Use the `onCreate` prop to allow users to create new options on-the-fly. Its value must be a function. This lets you render a `prompt` to ask users about the new value. You can return either the new choice directly or a Promise resolving to the new choice.
0 commit comments