How to use the devextreme/events.on function in devextreme

To help you get started, we’ve selected a few devextreme examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DevExpress / devextreme-angular / tests / src / core / nested-option.spec.ts View on Github external
ngAfterViewInit() {
        let element = this.element.nativeElement;

        extractTemplate(this, this.element, this.renderer, this.document);

        element.classList.add('dx-visibility-change-handler');
        events.on(element, 'dxshown', function() {
            this.shownEventFired = true;
        }.bind(this));

        this.template.render({
            container: document.querySelector('dx-test-widget')
        });
    }
}
github DevExpress / devextreme-angular / tests / src / ui / events.spec.ts View on Github external
fixture.ngZone.runOutsideAngular(() => {
            events.on(element, 'click', () => {
                expect(NgZone.isInAngularZone()).toBe(true);
                counter++;
            });
        });
github DevExpress / devextreme-cli / templates / react / application / src / components / side-navigation-menu / side-navigation-menu.js View on Github external
getElementRef = ref => {
    if (this.elementRef) {
      events.off(this.elementRef, 'dxclick');
    }

    this.elementRef = ref;
    events.on(this.elementRef, 'dxclick', e => {
      this.props.openMenu(e);
    });
  };