How to use the @pluginjs/dropdown function in @pluginjs/dropdown

To help you get started, we’ve selected a few @pluginjs/dropdown 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 pluginjs / pluginjs / modules / color-selector / src / main.js View on Github external
setupDropdown(options) {
    this.DROPDOWN = new Dropdown(this.PREVIEW.element, {
      ...options,
      reference: this.element,
      target: this.$panel,
      hideOnSelect: false,
      hideOutClick: true,
      onShown: () => {
        this.leave('save')
        this.COLORPICKER.oldColor = this.COLORPICKER.color
        this.GRADIENTPICKER.oldColor = this.GRADIENTPICKER.color
        this.oldColor.module = this.module
        this.oldColor.color = this.color
        this.switchModule(this.module)
      },
      onHided: () => {
        this.update()
      }

@pluginjs/dropdown

A flexible modern dropdown js plugin.

GPL-3.0
Latest version published 2 years ago

Package Health Score

46 / 100
Full package analysis

Popular @pluginjs/dropdown functions