[List] extract button from ListItem to ListItemButton#26446
[List] extract button from ListItem to ListItemButton#26446
Conversation
|
Details of bundle changes (experimental) @material-ui/core: parsed: +0.10% , gzip: +0.09% |
Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>
…at/list-item-improvement
packages/material-ui/src/ListItemButton/listItemButtonClasses.ts
Outdated
Show resolved
Hide resolved
| @@ -33,25 +33,25 @@ export default function CheckboxList() { | |||
| <ListItem | |||
| key={value} | |||
| role={undefined} | |||
There was a problem hiding this comment.
Its correct place is on the ListItemButton
Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>
Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>
| * If `true`, the list item is focused during the first mount. | ||
| * Focus will also be triggered if the value changes from false to true. | ||
| * @default false | ||
| * @deprecated will be removed in v6, checkout `ListItemButton` instead |
There was a problem hiding this comment.
Let's not mention any timeline for planned removals. They just become confusing if something changes and don't provide any value now. Mentioning the alternative should be enough.
There was a problem hiding this comment.
There is no visual feedback in https://deploy-preview-26446--material-ui.netlify.app/api/list-item/#props that it's deprecated.
Should we have a deprecatedPropType() as we make them deprecated in TypeScript?
|
For documentation we would need to use We can do deprecation in a separate release though. |
|
Looking at the first demo in https://deploy-preview-26446--material-ui.netlify.app/components/lists/#simple-list, it looks like we are not following the canonical DOM structure:
Should we update the demo? |
Sure, will create a PR. |
|
For context, I found this working on #26711. It took me a while to find the List example I could copy with the new DOM structure. |

the main changes are
ListItem.jsandListItemButton.js, the rests are demos update.ListItemsecondaryActionprop to stop checking childrendisablePaddingprop (similar toList) to use withListItemButtonbuttonrelated propsListItemButtondense,alignItems,divideranddisableGuttersdocs
ListItemButtoncloses #13597
closes #26442
closes #26469
closes #14971 (deprecate
buttonprop)Preview: https://deploy-preview-26446--material-ui.netlify.app/components/lists/