I want to change icon of button in split button to the icon of option selected from dropdown.
var items = [
{
text: 'Paste',
iconCss: 'e-btn-icons e-paste',
},
{
text: 'Paste Special',
iconCss: 'e-btn-icons e-paste-special',
},
{
text: 'Paste as Formula',
iconCss: 'e-btn-icons e-paste-formula',
},
{
text: 'Paste as Hyperlink',
iconCss: 'e-btn-icons e-paste-hyperlink',
},
];
var splitButton = new ej.splitbuttons.SplitButton({
items: items,
iconCss: 'e-btn-icons e-paste',
select: function (ch) {
var newIcon = ch.item.properties.iconCss;
this.properties.iconCss = newIcon;
this.dataBind() ;
},
});
splitButton.appendTo('#iconsplitbtn');