Skip to content

[Autocomplete] Update fullWidth prop documentation#48626

Open
vipin8797 wants to merge 4 commits into
mui:masterfrom
vipin8797:fix-autocomplete-docs
Open

[Autocomplete] Update fullWidth prop documentation#48626
vipin8797 wants to merge 4 commits into
mui:masterfrom
vipin8797:fix-autocomplete-docs

Conversation

@vipin8797

Copy link
Copy Markdown

Description

This PR updates the JSDoc for the fullWidth prop in the Autocomplete component.

As discussed in issue #47811, the Autocomplete component treats undefined and false differently for the fullWidth prop (it acts as a fallback to true for the inner input when undefined, but restricts width when explicitly set to false). 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

@code-infra-dashboard

code-infra-dashboard Bot commented Jun 5, 2026

Copy link
Copy Markdown

Deploy preview

https://deploy-preview-48626--material-ui.netlify.app/

Bundle size

Bundle Parsed size Gzip size
@mui/material 0B(0.00%) 0B(0.00%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/private-theming 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@zannager zannager added the scope: autocomplete Changes related to the autocomplete. This includes ComboBox. label Jun 8, 2026
@zannager zannager requested a review from silviuaavram June 8, 2026 15:47
@silviuaavram

Copy link
Copy Markdown
Member

Hey @vipin8797 it seems the CI does not like something about the way the docs is written.

@vipin8797

Copy link
Copy Markdown
Author

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 Google.Will style rule. I have updated the JSDoc to use the correct present tense and regenerated the API docs in the latest commit.

(Note: The newly failing ci/circleci: test_regressions and test-dev checks seem unrelated to my JSDoc changes, likely stemming from my recent sync with the master branch. Let me know if there's anything else I should adjust!)

@silviuaavram

Copy link
Copy Markdown
Member

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

Page /material-ui/api/autocomplete:
Error:   39:2  error  Stray end tag '</p>'  close-order

@brijeshb42 is there a gap in the CI check? I ran pnpm docs:api and it's not overriding anything in the generated API HTML.

* 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: autocomplete Changes related to the autocomplete. This includes ComboBox.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[autocomplete] regression in width behavior in v7.3.8

4 participants