You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When options is blank-array, or options is not present at all, the "dropdown" side of SplitButton is still displayed, and when clicked an empty Popover is rendered.
To Reproduce
Steps to reproduce the behavior:
Use this TSX :
<OuiSplitButton >Test</OuiSplitButton>
See dropdown button
Click dropdown button
See empty Popver (2-pixel line under dropdown)
Expected behavior
No dropdown button, no popover
The text was updated successfully, but these errors were encountered:
While I see where you are coming from, I wouldn't categorize this as a bug because this is how an empty native <select /> elements works too: it shows a minimal empty menu when activated. Additionally, this being a primitive components, it is the consumer who should make sure the component is used correctly.
Thanks for raising a PR but I don't believe this is the component or the library's problem to solve. I will let others chime in as well before deciding how to move ahead.
My personal opinion is that a design system is supposed to abstract away the complexity of managing the UI for a developer. @AMoo-Miki what you're proposing puts the responsibility back on the developer to handle the case where there are no alternate actions. While this is simple enough to do, it goes against why we use UI libraries in the first place. The more heavy lifting the UI library can do for you, the less the developer needs to think when they use the library and the less chances there are for inconsistent patterns to show up.
Describe the bug
When options is blank-array, or options is not present at all, the "dropdown" side of SplitButton is still displayed, and when clicked an empty Popover is rendered.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No dropdown button, no popover
The text was updated successfully, but these errors were encountered: