-
Notifications
You must be signed in to change notification settings - Fork 3.5k
SplitButton leveraging PopupBox #3382
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
c98459e
to
a462570
Compare
This is exactly what I was looking for. Would be very useful to have in my project. Being a beginner, I haven't been able to create such a button yet. I tried it several times but there was always something not working. Looking forward to this being merged! |
It still needs a bit of work though 😃 |
Styles added and showcased in the demo app
3741c36
to
7ba11b6
Compare
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.
Looking good so far.
Would like to see UI tests get implemented. I started on this work and left some comments on things to do (the tests are not all passing yet).
Specifically tests on Click event and Command would be good to do
This allows for controlling the content of the right-side button of the SplitButton from a consumer perspective.
Ripple does not work correctly with the cleanup, and the Click event fires when the Popup opens which is also undesirable. These two things are prevented with the "workaround".
This PR adds a SplitButton to the MDIX library by introducing a
SplitButton
custom control which is a composite control consisting of a normalButton
and aPopupBox
next to it. It tries to leverage the existing button styles to avoid too much maintenance work.PROs:
CONs:
NOTE: I opted to not use the new cool resource key stuff generated by
mdresgen
yet. It will probably require changes in theButton
templates as well, and as such I would rather get this in and then open a new PR where I can try to use the new features of the theme generation.Demo apps are extended with the following (on the Buttons page) showcasing all currently added styles:

Example usage is something along these lines: