Skip to content

Commit

Permalink
[Doc] Fix AutocompleteInput resettable prop isn't documented
Browse files Browse the repository at this point in the history
The doc added in #5396 was removed by mistake in 8f4c02b
  • Loading branch information
fzaninotto committed Jan 13, 2021
1 parent c05d5ca commit d7b5b1b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/Inputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -522,13 +522,15 @@ import { AutocompleteInput } from 'react-admin';
| Prop | Required | Type | Default | Description |
| ------------------------- | -------- | -------------- | ------------ | ------------------------------------ |
| `allowEmpty` | Optional | `boolean` | `false` | If `false` and the `searchText` typed did not match any suggestion, the `searchText` will revert to the current value when the field is blurred. If `true` and the `searchText` is set to `''` then the field will set the input value to `null`. |
| `clearAlwaysVisible` | Optional | `boolean` | `false` | When `resettable` is true, set this prop to `true` to have the Reset button visible even when the field is empty |
| `choices` | Required | `Object[]` | `-` | List of items to autosuggest |
| `emptyValue` | Optional | `any` | `''` | The value to use for the empty element |
| `emptyText` | Optional | `string` | `''` | The text to use for the empty element |
| `matchSuggestion` | Optional | `Function` | `-` | Required if `optionText` is a React element. Function returning a boolean indicating whether a choice matches the filter. `(filter, choice) => boolean` |
| `optionText` | Optional | `string` | `Function` | `Component` | `name` | Fieldname of record to display in the suggestion item or function which accepts the correct record as argument (`(record)=> {string}`) |
| `optionValue` | Optional | `string` | `id` | Fieldname of record containing the value to use as input value |
| `inputText` | Optional | `Function` | `-` | If `optionText` is a custom Component, this function is needed to determine the text displayed for the current selection. |
| `resettable` | Optional | `boolean` | `false` | Display a button to reset the text filter. Useful when using `<AutocompleteInput>` inside `<Filter>` |
| `setFilter` | Optional | `Function` | `null` | A callback to inform the `searchText` has changed and new `choices` can be retrieved based on this `searchText`. Signature `searchText => void`. This function is automatically setup when using `ReferenceInput`. |
| `shouldRenderSuggestions` | Optional | `Function` | `() => true` | A function that returns a `boolean` to determine whether or not suggestions are rendered. Use this when working with large collections of data to improve performance and user experience. This function is passed into the underlying react-autosuggest component. Ex.`(value) => value.trim() > 2` |
| `suggestionLimit` | Optional | `number` | `null` | Limits the numbers of suggestions that are shown in the dropdown list |
Expand Down

0 comments on commit d7b5b1b

Please sign in to comment.