Disable a button and updateData of a model

  • 1
  • Question
  • Updated 3 years ago
  • Answered

I'm trying to disable a button and it works great in javascript but once I update a model it switches the button back to enable. I'm assuming it's drawing the page again on model update. Is there any way to disable the button?  Here is my test javascript code.

skuid.$('#TestButton').button('disable');
 var mydateModel = skuid.model.getModel('AEMDate');
 var firstDateRow = mydateModel.getFirstRow();
 alert('end date = ' + firstDateRow.End_Date__c);
 mydateModel.updateData();


Photo of Rich Lenz

Rich Lenz

  • 70 Points

Posted 3 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
If you'll wait for a little while,  the Banzai release will allow you to disable page title buttons using conditional rendering logic.  Where before you could simply hide the button,  now you will be able to disable the button.