Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request #325 from PolymerElements/expand-sizing-target-for…
Browse files Browse the repository at this point in the history
…-scrollbars

Add a property to pass `expandSizingTargetForScrollbars` through to the internal `<paper-menu-button>`.
  • Loading branch information
bicknellr authored Mar 5, 2021
2 parents 0c5fc21 + 846029a commit 711ba23
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 32 deletions.
56 changes: 26 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@polymer/iron-validatable-behavior": "^3.0.0-pre.26",
"@polymer/paper-behaviors": "^3.0.0-pre.27",
"@polymer/paper-input": "^3.1.0",
"@polymer/paper-menu-button": "^3.0.0-pre.26",
"@polymer/paper-menu-button": "^3.1.0",
"@polymer/paper-ripple": "^3.0.0-pre.26",
"@polymer/paper-styles": "^3.0.0-pre.26",
"@polymer/polymer": "^3.3.1"
Expand Down
9 changes: 8 additions & 1 deletion paper-dropdown-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Polymer({
_template: html`
<style include="paper-dropdown-menu-shared-styles"></style>
<paper-menu-button id="menuButton" vertical-align="[[verticalAlign]]" horizontal-align="[[horizontalAlign]]" dynamic-align="[[dynamicAlign]]" vertical-offset="[[_computeMenuVerticalOffset(noLabelFloat, verticalOffset)]]" disabled="[[disabled]]" no-animations="[[noAnimations]]" on-iron-select="_onIronSelect" on-iron-deselect="_onIronDeselect" opened="{{opened}}" close-on-activate allow-outside-scroll="[[allowOutsideScroll]]" restore-focus-on-close="[[restoreFocusOnClose]]">
<paper-menu-button id="menuButton" vertical-align="[[verticalAlign]]" horizontal-align="[[horizontalAlign]]" dynamic-align="[[dynamicAlign]]" vertical-offset="[[_computeMenuVerticalOffset(noLabelFloat, verticalOffset)]]" disabled="[[disabled]]" no-animations="[[noAnimations]]" on-iron-select="_onIronSelect" on-iron-deselect="_onIronDeselect" opened="{{opened}}" close-on-activate allow-outside-scroll="[[allowOutsideScroll]]" restore-focus-on-close="[[restoreFocusOnClose]]" expand-sizing-target-for-scrollbars="[[expandSizingTargetForScrollbars]]">
<!-- support hybrid mode: user might be using paper-menu-button 1.x which distributes via <content> -->
<div class="dropdown-trigger" slot="dropdown-trigger">
<paper-ripple></paper-ripple>
Expand Down Expand Up @@ -222,6 +222,13 @@ Polymer({
* Whether focus should be restored to the dropdown when the menu closes.
*/
restoreFocusOnClose: {type: Boolean, value: true},

/**
* If true and scrollbars are added to the dropdown after it is positioned,
* the size of the added scrollbars will be added to its `maxWidth` and
* `maxHeight`.
*/
expandSizingTargetForScrollbars: {type: Boolean, value: false},
},

listeners: {'tap': '_onTap'},
Expand Down

0 comments on commit 711ba23

Please sign in to comment.