- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 32.7k
[core] Fix a few more key spread issues #42168
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
Conversation
| Netlify deploy previewhttps://deploy-preview-42168--material-ui.netlify.app/ Bundle size reportDetails of bundle changes (Toolpad) | 
835a59c    to
    531c9bb      
    Compare
  
    | getOptionProps: ( | ||
| renderedOption: UseAutocompleteRenderedOption<Value>, | ||
| ) => React.HTMLAttributes<HTMLLIElement>; | ||
| ) => React.HTMLAttributes<HTMLLIElement> & { key: any }; | 
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
| // 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> | 
There was a problem hiding this comment.
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).
531c9bb    to
    be5dfd2      
    Compare
  
    
A quick iteration on #39833.
There are a lot more issues that I didn't fix. We will need to cherry-pick to
master.