-
Notifications
You must be signed in to change notification settings - Fork 839
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
[EuiSelectableSitewideTemplate][Fix] Do not show noMatchesMessage if one is provided by consumer #7758
Conversation
Preview staging links for this PR:
|
💚 Build Succeeded
History
|
@rshen91 To be totally honest with you, I don't see how this PR would fix the issue shown in the screencap. The messages aren't the same at all (EUI's default empty message is I'm pretty sure what's happening on a slow network is that the SVG image is just taking extra time to load in. |
@@ -243,7 +245,7 @@ export const EuiSelectableTemplateSitewide: FunctionComponent< | |||
}} | |||
loadingMessage={loadingMessage} | |||
emptyMessage={emptyMessage} | |||
noMatchesMessage={emptyMessage} | |||
noMatchesMessage={noMatchesMessage ?? emptyMessage} |
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.
@cee-chen I think this is the part that's causing the issue in elastic/kibana#151199 since selectable_template_sitewide isn't registering the noMatchesMessage intially? Lmk what you think, I definitely concede I could be misunderstanding.
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.
It is registering it via ...rest
. Anything that comes in from that spread overrides the preceding props, which in production includes noMatchesMessage
.
Summary
Hello team! I'm working on fixing elastic/kibana#151199 and I think this PR addresses the strange behavior.
Please provide me any guidance on the fix and getting it up to library standards. Thank you!
I'm including a video of the strange double no results errors displayed with a slow network:
Screen.Recording.2024-05-14.at.12.56.11.PM.mov
Add unit testAdd cypress test