how i can update lable of control using office js Office.RibbonUpdaterData interface please help me in this for ribbon button enable and disable this is working below code
async function updateButton(id, enabled, groupID) {
const button = { id, enabled };
const parentGroup = { id: groupID, controls: [button] };
const parentTab = { id: TAB_ID, groups: [parentGroup] };
const ribbonUpdater = { tabs: [parentTab] };
try {
await Office.ribbon.requestUpdate(ribbonUpdater);
console.log(`Button ${id} ${enabled ? "enabled" : "disabled"} in group ${groupID}.`);
} catch (error) {
console.error(`Error updating button ${id} in group ${groupID}: ${error}`);
}
}
but this is not working for update label. I will be glad if someone can help me with this.
i want update label of controls i mean ribbon button using office js.