drop-down-menupolymerfrontendpaper-elements

How to disable animations for polymer's paper-dropdown-menu element?


I need to disable all animations that happen when opening/closing polymer's paper-dropdown-menu element. Documentation: https://www.webcomponents.org/element/@polymer/paper-dropdown-menu/elements/paper-dropdown-menu#property-noAnimations

The documentation shows that the element has a noAnimations property that I should be able to set to true to disable all animations, but it's not working for me.

        <paper-dropdown-menu
          noAnimations="true"
          selected="{{selected}}"
          attr-for-selected="name"
          vertical-offset="60"
        >
          <paper-listbox slot="dropdown-content" selected="1">
            <template is="dom-repeat" items="{{sections}}">
                <paper-item name$="{{item}}">{{item}}</paper-item>
            </template>
          </paper-listbox>
        </paper-dropdown-menu>

I expected that setting noAnimations="true" would disable all animations, but it does not. Am I missing something?


Solution

  • Polymer attributes format is always lowercase and separated with dashes; so try:

    <paper-dropdown-menu
      no-animations="true"
      selected="{{selected}}"
      attr-for-selected="name"
      vertical-offset="60"
    >
    ...
    

    instead:

        <paper-dropdown-menu
          noAnimations="true"
          selected="{{selected}}"
          attr-for-selected="name"
          vertical-offset="60"
        >