prateekbh / preact-material-components

preact wrapper for "Material Components for the web"
https://material.preactjs.com
MIT License
555 stars 81 forks source link

Unable to listen for dialog events #1358

Open kartikwatwani opened 4 years ago

kartikwatwani commented 4 years ago

I am unable to listen for MDCDialog:closed event. I am adding a listener as shown below

        this.dialog.MDComponent.listen("MDCDialog:closed",function(){
          console.log('MDCDialog:closed');
        });
        this.dialog.MDComponent.listen("MDCDialog:closing",function(){
          console.log('MDCDialog:closing');
        })

        this.dialog.MDComponent.listen("MDCDialog:opening",function(){
          console.log('MDCDialog:opening');
        });
        this.dialog.MDComponent.listen("MDCDialog:opened",function(){
          console.log('MDCDialog:opened');
        });

None of the above listeners are firing. Can you help me solve this issue or tell me possible things that I might be doing wrong while adding the listeners? Thank You.