Once a sheet has been created I can get the instance by using app.sheet.get()…
console.log(app.sheet.get('#my-sheet'));
But how can I detect if it is open or closed?
Once a sheet has been created I can get the instance by using app.sheet.get()…
console.log(app.sheet.get('#my-sheet'));
But how can I detect if it is open or closed?
var sheet = app.sheet.get('#my-sheet');
var opened = sheet.$el.hasClass('modal-in');
Thank you.
I dug deeper into the Dom element after posting that and figured it out, sometimes it’s just the process of posting a question that helps you to figure it out yourself.
I had to check for sheet too obviously:
const sheet = app.sheet.get('#my-sheet');
var opened = sheet ? sheet.$el.hasClass('modal-in') : null;