Skip to content

Commit

Permalink
Merge pull request #9693 from marmelab/doc/abort-controller-update-au…
Browse files Browse the repository at this point in the history
…tocomplete-input-doc

[Doc] Add a tip about abort controller in the `<AutocompleteInput>` doc
  • Loading branch information
fzaninotto authored Feb 29, 2024
2 parents 0d75c41 + 3cfcde6 commit 4c3ca4c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/AutocompleteInput.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ This delay can be customized by setting the `debounce` prop.
</ReferenceInput>
```

**Tip**: [The `signal` Parameter section](./DataProviders.md#the-signal-parameter) explains how to use the [AbortSignal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) interface to abort the last API call and avoid parallel requests.

## `emptyText`

If the input isn't required (using `validate={required()}`), and you need a choice to represent the empty value, set `emptyText` prop and a choice will be added at the top, with its value as label.
Expand Down

0 comments on commit 4c3ca4c

Please sign in to comment.