Skip to content

Conversation

@oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented May 8, 2024

A quick iteration on #39833.

There are a lot more issues that I didn't fix. We will need to cherry-pick to master.

@oliviertassinari oliviertassinari added type: bug It doesn't behave as expected. external dependency Blocked by external dependency, we can’t do anything about it. internal Behind-the-scenes enhancement. Formerly called “core”. labels May 8, 2024
@mui-bot
Copy link

mui-bot commented May 8, 2024

Netlify deploy preview

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

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against be5dfd2

getOptionProps: (
renderedOption: UseAutocompleteRenderedOption<Value>,
) => React.HTMLAttributes<HTMLLIElement>;
) => React.HTMLAttributes<HTMLLIElement> & { key: any };
Copy link
Member Author

Choose a reason for hiding this comment

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

To propagate in Base UI, no?

Choose a reason for hiding this comment

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

would & {key: Key} have been more appropriate here?

The introduction of this any is causing me linter problems when trying to use the same pattern in my code and pass the key explicitly in renderOption.

Comment on lines 627 to 632
// Need to clearly apply key because of https://github.com/vercel/next.js/issues/55642
const { key, ...otherProps } = props2;
return (
<li {...props2} key={props2.key}>
<li key={key} {...otherProps}>
{getOptionLabel(option)}
</li>
Copy link
Member Author

Choose a reason for hiding this comment

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

Revert #40968 because of #39833 (comment).

@oliviertassinari oliviertassinari added the needs cherry-pick The PR should be cherry-picked to master after merge. label May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external dependency Blocked by external dependency, we can’t do anything about it. internal Behind-the-scenes enhancement. Formerly called “core”. needs cherry-pick The PR should be cherry-picked to master after merge. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants