Dashboard Configure button

Hi,
I am building a dashboard item (using ACE, React).
I looked at the example here: Bitbucket
But I cannot figure out how do I control the “Configure” button.
How does it know when to disable/enable it?
Thanks
Yaki