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] Improve doc for <Autocomplete onCreate> and similar props #9858

Merged
merged 2 commits into from
May 20, 2024

Conversation

fzaninotto
Copy link
Member

@fzaninotto fzaninotto commented May 18, 2024

Problem

I had to enable choice creation in an AutocompleteInput. I followed the docs and I didn't manage to do it. I had to dig down the code.

Solution

Improve choice creation documentation

Note: I know that there is still work to do for ReferenceArrayInput & co, but Rome wasn't built in a day and this is enough for a PR.

@@ -166,32 +166,6 @@ You can filter the query used to populate the possible values. Use the `filter`

**Note**: When users type a search term in the `<AutocompleteInput>`, this doesn't affect the `filter` prop. Check the [Customizing the filter query](#customizing-the-filter-query) section below for details on how that filter works.

## `format`
Copy link
Member Author

Choose a reason for hiding this comment

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

Moved below as " Transforming The Input Value" because the format prop doesn't actually exist in this component.

{ id: 4, name: 'Charles Baudelaire' },
{ id: 5, name: 'Marcel Proust' },
];

export const OnCreate = () => (
Copy link
Member Author

Choose a reason for hiding this comment

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

This story was broken since b6554db (my bad)

docs/AutocompleteInput.md Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick (non-blocking):
I'm not sure that keeping the black browser strip is useful for this screencast

Copy link
Member Author

Choose a reason for hiding this comment

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

If I don't, the alert is cut (as it is anchored to the URL input rather than the window top)

Co-authored-by: erwanMarmelab <131013150+erwanMarmelab@users.noreply.github.com>
@fzaninotto fzaninotto merged commit 7364a0b into master May 20, 2024
12 checks passed
@fzaninotto fzaninotto deleted the automplete-onCreate-doc branch May 20, 2024 12:00
@fzaninotto fzaninotto added this to the 4.16.18 milestone May 20, 2024
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.

2 participants