Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doc] Fix <AutompleteInput create> prop example #9071

Merged

Conversation

adguernier
Copy link
Contributor

@adguernier adguernier commented Jul 3, 2023

Problem:

  • A sentence was not clear in my opinion
  • What does create prop ?

Solution:

  • Sentence rearrangement
  • Add a video to show what create prop does

@fzaninotto
Copy link
Member

The video is too wide and too tall, and it's barely readable.

@adguernier
Copy link
Contributor Author

The video is too wide and too tall, and it's barely readable.

I update videos, let me know if their are ok :)

@fzaninotto fzaninotto merged commit f29a61a into master Jul 5, 2023
@fzaninotto fzaninotto deleted the doc-clearer-explanation-for-option-text-in-automplete-input branch July 5, 2023 12:15
@fzaninotto fzaninotto added this to the 4.12.1 milestone Jul 5, 2023
@fzaninotto fzaninotto changed the title [Doc] Clearer explanation for some props in AutompleteInput [Doc] Fix <AutompleteInput create> prop example Jul 5, 2023
@@ -799,7 +831,7 @@ const CreateCategory = () => {

**Tip:** As showcased in this example, react-admin provides a convenient hook for accessing the filter the user has already input in the `<AutocompleteInput>`: `useCreateSuggestionContext`.

The `Create %{item}` option will only be displayed once the user has already set a filter (by typing in some input). If you expect your users to create new items often, you can make this more user-friendly by adding a placeholder text like this:
The `Create %{item}%` option will only be displayed once the user has already set a filter (by typing in some input). If you expect your users to create new items often, you can make this more user-friendly by adding a placeholder text like this:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this was not a typo, this is the way we declare template variables in polyglot 😬
(see https://github.com/marmelab/react-admin/blob/master/packages/ra-language-english/src/index.ts#L16)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants