BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
And for the template, I've tried with <div id="sbMenuTarget">, with <div#sbMenuTarget> , with <ng-template id="sbMenuTarget">, with <ng-template #sbMenuTarget>, ... in each case, clicking for the menu gets nothing happening at all. (It does work normally without the target input.)
Hi Stephen,
Query: My first problem was how to style the top part of the SplitButton?
For the split button component, the button text and down-arrow button are placed separately. This is the behavior of the split button. If you want to combine both as a single button, then you can use the dropdown button component. Refer to the below links for more details.
Demo’s link: https://ej2.syncfusion.com/angular/demos/#/bootstrap5/button/dropdown-button
UG link: https://ej2.syncfusion.com/angular/documentation/drop-down-button/getting-started
Note: Both the split button and dropdown button functionality are almost the same; the only difference is the UI.
Query: Template related issue?
Once we set the target property of the split button and dropdown button components, the items property data does not render for those components; the popup element takes the target element alone. This is the behavior of those components.
UG link: https://ej2.syncfusion.com/angular/documentation/split-button/popup-items#popup-templating
Sample link: https://stackblitz.com/edit/angular-ben9tp?file=src%2Fapp.component.html
Get back to us if you need any further assistance on this.
Regards,
YuvanShankar A
Actually I found a solution to the original problem. Here it is for anyone wondering.
First give the splitbutton an id, like so:
Yes, Stephen. We can customize the split button appearance by override the CSS style shown as below.
.e-split-btn-wrapper button { background-color: #6767dc !important; } |
Output screenshot:
Sample link: https://stackblitz.com/edit/angular-ben9tp-z8fhfp?file=src%2Fapp.component.css
Get back to us if you need any further assistance on this.