[docs] Improve TransferList examples#48845
Merged
silviuaavram merged 3 commits intoJul 24, 2026
Merged
Conversation
Deploy previewBundle size
Check out the code infra dashboard for more information about this PR. |
Contributor
There was a problem hiding this comment.
Pull request overview
Refreshes the TransferList documentation demos to improve keyboard navigation and focus handling by adopting MenuList (roving tab index), refining transfer behaviors, and extracting reusable list rendering into components.
Changes:
- Replaced
List/ListItemButtonwithMenuList/MenuItemin TransferList demos to leverage roving tab index behavior. - Added explicit focus management after transfers so focus moves to the receiving list.
- Adjusted “transfer all” behavior to clear moved items from the checked set; tweaked Select All header density (smaller checkbox, reduced padding) and extracted custom list components.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| docs/data/material/components/transfer-list/TransferList.tsx | Switches list rendering to MenuList/MenuItem, extracts CustomList, adds focus management and aligns “transfer all” checked-state behavior. |
| docs/data/material/components/transfer-list/TransferList.js | JS variant of the above demo changes (including extracted CustomList and focus/checked-state updates). |
| docs/data/material/components/transfer-list/SelectAllTransferList.tsx | Extracts CustomList, uses MenuList/MenuItem, updates header checkbox sizing/padding, and adds focus management after transfers. |
| docs/data/material/components/transfer-list/SelectAllTransferList.js | JS variant of the above demo changes (with CustomList + focus management and updated header styling). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+94
to
+101
| CustomList.propTypes = { | ||
| checked: PropTypes.arrayOf(PropTypes.number).isRequired, | ||
| handleToggle: PropTypes.func.isRequired, | ||
| handleToggleAll: PropTypes.func.isRequired, | ||
| items: PropTypes.arrayOf(PropTypes.number).isRequired, | ||
| numberOfChecked: PropTypes.func.isRequired, | ||
| title: PropTypes.node, | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
TransferListexamples could use some refresh.MenuListinstead ofListto make use of the roving tabindex strategy.Preview: https://deploy-preview-48845--material-ui.netlify.app/material-ui/react-transfer-list/