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
Copy file name to clipboardExpand all lines: docs/AutocompleteArrayInput.md
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,6 +68,7 @@ The form value for the source must be an array of the selected values, e.g.
68
68
|`filterToQuery`| Optional |`string` => `Object`|`q => ({ q })`| How to transform the searchText into a parameter for the data provider |
69
69
|`inputText`| Optional |`Function`|`-`| Required if `optionText` is a custom Component, this function must return the text displayed for the current selection. |
70
70
|`matchSuggestion`| Optional |`Function`|`-`| Required if `optionText` is a React element. Function returning a boolean indicating whether a choice matches the filter. `(filter, choice) => boolean`|
71
+
|`offline`| Optional |`ReactNode`| - | What to render when there is no network connectivity when fetching the choices |
71
72
|`onChange`| Optional |`Function`|`-`| A function called with the new value, along with the selected records, when the input value changes |
72
73
|`onCreate`| Optional |`Function`|`-`| A function called with the current filter value when users choose to create a new choice. |
73
74
|`optionText`| Optional |`string`|`Function`|`Component`|`name`| Field name of record to display in the suggestion item or function which accepts the correct record as argument (`(record)=> {string}`) |
`<AutocompleteArrayInput>` can display a custom message when it can't fetch the choices because there is no network connectivity, thanks to the `offline` prop.
0 commit comments