core/client/app/components/gh-dropdown.js
// Called by the dropdown service when any dropdown button is clicked.
Called by the dropdown service when any dropdown button is clicked.
Called by the dropdown service when any dropdown button is clicked .
toggle(options) {
        let isClosing = this.get('closing');
        let isOpen = this.get('isOpen');
        let name = this.get('name');
        let targetDropdownName = options.target;
        let button = this.get('button');
        if (name === targetDropdownName && (!isOpen || isClosing)) {
            if (!button) {
                button = options.button;
                this.set('button', button);
            }
            this.open();
        } else if (isOpen) {
            this.close();
        }
    }
toggle ( options ) { let isClosing = this . get ( 'closing' ) ; let isOpen = this . get ( 'isOpen' ) ; let name = this . get ( 'name' ) ; let targetDropdownName = options . target ; let button = this . get ( 'button' ) ; if ( name === targetDropdownName && ( ! isOpen || isClosing ) ) { if ( ! button ) { button = options . button ; this . set ( 'button' , button ) ; } this . open ( ) ; } else if ( isOpen ) { this . close ( ) ; } }
Called by the dropdown service when any dropdown button is clicked.
Called by the dropdown service when any dropdown button is clicked .