I am trying to show or hide a ribbon button using the following code:
jafgha.Activities.showButton = function (context)
{
console.log("testing validity**********");
const value = context.getAttribute("slakpistatus").getValue();
console.log(value);
return value === "2";
}

This does not work as the button is always displayed. Is there something I'm doing wrong?