Update Items in SelectButton


#1

What is the best way to update the items in a SelectButton? I have tried the below code. The items in the control update, but the display does not. I am referring to the one in a ribbon, but I assume it is the same process for one in a toolbar.

Cheers,

Alex

someRibbon.data.update(ribbonMenuItems.FontFace, {
items: fonts.map(
function (fontName) {
return {
“type”: “menuItem”,
“value”: fontName,
“css”: ribbonMenuItems.FontFace
}
})
});


#2

Supposedly this method has been deprecated, but it still seems to be working for me, and is often easier than destroying and recreating the object I’m trying to update, so I still use it.