How to use the rdk/service/popup.service.PopupService.setBackground function in rdk

To help you get started, we’ve selected a few rdk 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 rdkmaster / jigsaw / src / rdk / component / dropdown / dropdown.ts View on Github external
}

        const option: PopupOptions = {
            pos: this._elementRef,
            posType: PopupPositionType.absolute,
            posOffset: {
                top: this._elementRef.nativeElement.offsetHeight
            },
            size: {width: Number(this._elementRef.nativeElement.offsetWidth)}
        };
        const popupInfo: PopupInfo = this._popupService.popup(this._contentTemplateRef, option);
        this._popupElement = popupInfo.element;
        this._disposePopup = () => {
            popupInfo.dispose()
        };
        PopupService.setBackground(this._popupElement, this._render);

        if (this._openTrigger === DropDownTrigger.mouseover && this._popupElement) {
            this._removeMouseoverHandler = this._render.listen(this._popupElement, 'mouseover', () => {
                if (this._timeout) {
                    clearTimeout(this._timeout);
                    this._timeout = null;
                }
            });
        }
        if (this._closeTrigger === DropDownTrigger.mouseout && this._popupElement) {
            this._removeMouseoutHandler = this._render.listen(this._popupElement, 'mouseout', () => {
                if (!this._timeout) {
                    this._timeout = setTimeout(() => {
                        this._closeDropDown();
                    }, 400);
                }

rdk

React Component Developer Kit

Apache-2.0
Latest version published 1 month ago

Package Health Score

47 / 100
Full package analysis