-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix: properly render empty state when filtering S2 ComboBox with sections #8735
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
Build successful! 🎉 |
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.
LGTM
@@ -27,7 +27,7 @@ const meta: Meta<typeof ComboBox<any>> = { | |||
}, | |||
tags: ['autodocs'], | |||
argTypes: { | |||
...categorizeArgTypes('Events', ['onInputChange', 'onOpenChange', 'onSelectionChange']), | |||
...categorizeArgTypes('Events', ['onInputChange', 'onOpenChange', 'onSelectionChange', 'onLoadMore']), |
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.
didn't realize we had to do this for any action handlers due to storybook 8 making implicit actions error...
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.
yeah... it's awful :(
// Only count sections and items when determining size so that | ||
// loaders and separators in RAC/S2 don't influence the emptyState determination | ||
if (node.type === 'section' || node.type === 'item') { | ||
size++; | ||
} | ||
|
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.
this shouldn't affect v3 theoretically since there wasn't a concept of loader/separator nodes
Did you want any tests for this? |
From testing
✅ Pull Request Checklist:
📝 Test Instructions:
Try filtering a S2 combobox that has sections and ensure that the empty state will appear properly.
🧢 Your Project:
RSP