fix: selectedKeys are not present in the collection warning in async case#2648
Conversation
🦋 Changeset detectedLatest commit: 6516161 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
@wingkwong is attempting to deploy a commit to the NextUI Inc Team on Vercel. A member of the Team first needs to authorize it. |
|
Warning Rate Limit Exceeded@wingkwong has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 19 minutes and 21 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. WalkthroughThe update introduces patches for the Changes
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
Review Status
Configuration used: .coderabbit.yaml
Files selected for processing (3)
- .changeset/rare-plums-speak.md (1 hunks)
- packages/hooks/use-aria-multiselect/src/use-multiselect-list-state.ts (2 hunks)
- packages/utilities/stories-utils/src/hooks/use-pokemon-list.ts (1 hunks)
Additional comments not posted (3)
packages/utilities/stories-utils/src/hooks/use-pokemon-list.ts (1)
17-17: The change to initializeisLoadingastruealigns well with the asynchronous loading behavior, ensuring the UI correctly reflects the loading state upon component mount.packages/hooks/use-aria-multiselect/src/use-multiselect-list-state.ts (2)
2-8: ExtendingMultiSelectListPropswithAsyncLoadableis a good approach to incorporate asynchronous loading properties into the multi-select list state management.
52-52: The conditional check forprops?.isLoadingbefore logging a warning aboutmissingKeyseffectively addresses the issue of unnecessary warnings during asynchronous loading.
There was a problem hiding this comment.
Actionable comments posted: 0
Review Status
Configuration used: .coderabbit.yaml
Files selected for processing (1)
- packages/hooks/use-aria-multiselect/src/use-multiselect-list-state.ts (2 hunks)
Files skipped from review as they are similar to previous changes (1)
- packages/hooks/use-aria-multiselect/src/use-multiselect-list-state.ts
Closes #2605
📝 Description
isLoadingistrue, skip checking missing keys since the collection hasn't built yet.isLoadingtotruein use-pokemon-list.ts by default to avoid cases likefalse->true->false.⛳️ Current behavior (updates)
Currently when the data is being fetched (isLoading = true), the warning is shown saying
defaultSelectedKeysis not in the collection.🚀 New behavior
💣 Is this a breaking change (Yes/No):
No
📝 Additional Information
Summary by CodeRabbit
SELECT defaultSelectedKeys.useMultiSelectListStateto better handle loading states.usePokemonListfor improved user experience.