[Autocomplete] Update fullWidth prop documentation#48626
Conversation
Deploy previewhttps://deploy-preview-48626--material-ui.netlify.app/ Bundle size
Check out the code infra dashboard for more information about this PR. |
|
Hey @vipin8797 it seems the CI does not like something about the way the docs is written. |
|
Hi @silviuaavram! Good catch. The CI (Vale linter) was failing because I used the future tense ("will be restricted") instead of the present tense ("is restricted"), which goes against the (Note: The newly failing |
|
It's not the wording, it's the resulting HTML that ends up in the API section. https://github.com/mui/material-ui/actions/runs/27193061937/job/80277735712?pr=48626 @brijeshb42 is there a gap in the CI check? I ran |
| * If `true`, the input will take up the full width of its container. | ||
| * If `true`, the input takes up the full width of its container. | ||
| * | ||
| * **Note:** `Autocomplete` treats `undefined` and `false` differently. |
There was a problem hiding this comment.
Remove the **Note:** part for now. There's a bug in our markdown parsing that'll need to be fixed separately.
cc: @silviuaavram
| * If `true`, the input will take up the full width of its container. | ||
| * If `true`, the input takes up the full width of its container. | ||
| * | ||
| * **Note:** `Autocomplete` treats `undefined` and `false` differently. |
Description
This PR updates the JSDoc for the
fullWidthprop in theAutocompletecomponent.As discussed in issue #47811, the
Autocompletecomponent treatsundefinedandfalsedifferently for thefullWidthprop (it acts as a fallback totruefor the inner input whenundefined, but restricts width when explicitly set tofalse). This behavior was intentional to avoid breaking changes, but was undocumented.This PR adds a note in the API documentation to clarify this distinct behavior to prevent future confusion.
Fixes #47811