How to use the @material/menu-surface/constants.Corner function in @material/menu-surface

To help you get started, we’ve selected a few @material/menu-surface 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 SpringflowNL / aurelia-mdc-elements / node_modules / @material / select / component.js View on Github external
MDCSelect.prototype.enhancedSelectSetup_ = function (menuFactory) {
        var isDisabled = this.root_.classList.contains(cssClasses.DISABLED);
        this.selectedText_.setAttribute('tabindex', isDisabled ? '-1' : '0');
        this.hiddenInput_ = this.root_.querySelector(strings.HIDDEN_INPUT_SELECTOR);
        this.menuElement_ = this.root_.querySelector(strings.MENU_SELECTOR);
        this.menu_ = menuFactory(this.menuElement_);
        this.menu_.hoistMenuToBody();
        this.menu_.setAnchorElement(this.root_);
        this.menu_.setAnchorCorner(menuSurfaceConstants.Corner.BOTTOM_START);
        this.menu_.wrapFocus = false;
    };
    MDCSelect.prototype.createRipple_ = function () {
github material-components / material-components-web / packages / mdc-select / component.ts View on Github external
private enhancedSelectSetup_(menuFactory: MDCMenuFactory) {
    const isDisabled = this.root_.classList.contains(cssClasses.DISABLED);
    this.selectedText_!.setAttribute('tabindex', isDisabled ? '-1' : '0');
    this.hiddenInput_ = this.root_.querySelector(strings.HIDDEN_INPUT_SELECTOR);
    this.menuElement_ = this.root_.querySelector(strings.MENU_SELECTOR)!;
    this.menu_ = menuFactory(this.menuElement_);
    this.menu_.hoistMenuToBody();
    this.menu_.setAnchorElement(this.root_);
    this.menu_.setAnchorCorner(menuSurfaceConstants.Corner.BOTTOM_START);
    this.menu_.wrapFocus = false;
  }
github material-components / material-components-web / packages / mdc-select / index.js View on Github external
enhancedSelectSetup_(menuFactory) {
    const isDisabled = this.root_.classList.contains(cssClasses.DISABLED);
    this.selectedText_.setAttribute('tabindex', isDisabled ? '-1' : '0');
    this.hiddenInput_ = this.root_.querySelector(strings.HIDDEN_INPUT_SELECTOR);
    this.menuElement_ = /** @type {HTMLElement} */ (this.root_.querySelector(strings.MENU_SELECTOR));
    this.menu_ = menuFactory(this.menuElement_);
    this.menu_.hoistMenuToBody();
    this.menu_.setAnchorElement(/** @type {!HTMLElement} */ (this.root_));
    this.menu_.setAnchorCorner(menuSurfaceConstants.Corner.BOTTOM_START);
    this.menu_.wrapFocus = false;
  }