Skip to content

Commit

Permalink
Merge pull request #43 from BrightspaceUILabs/fix-double-scroll
Browse files Browse the repository at this point in the history
fix: Make max-height public property in autocomplete, allow setting on autocomplete-input-text
  • Loading branch information
rcausey authored Feb 5, 2021
2 parents 358a47b + 8de4a3e commit 0042cf5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions autocomplete-input-text.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ $_documentContainer.innerHTML = `<dom-module id="d2l-labs-autocomplete-input-tex
data="[[data]]"
dropdown-label="[[dropdownLabel]]"
id="[[_prefix('d2l-labs-autocomplete')]]"
max-height="[[maxHeight]]"
min-length="[[minLength]]"
on-d2l-labs-autocomplete-suggestion-selected="_handleSuggestionSelected"
remote-source="[[remoteSource]]"
Expand Down Expand Up @@ -66,6 +67,9 @@ class AutocompleteInputText extends PolymerElement {
type: String,
value: null,
},
maxHeight: {
type: Number,
},
minLength: {
type: String,
},
Expand Down
14 changes: 7 additions & 7 deletions autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ $_documentContainer.innerHTML = `<dom-module id="d2l-labs-autocomplete">
</div>
<d2l-dropdown-content
id="d2l-labs-autocomplete-dropdown-content"
max-height="[[_maxHeight]]"
max-height="[[maxHeight]]"
min-width="[[_minWidth]]"
no-auto-focus="[[selectFirst]]"
no-padding=""
Expand Down Expand Up @@ -140,12 +140,6 @@ class Autocomplete extends PolymerElement {
type: Object,
value: { UP: 38, DOWN: 40, ENTER: 13, ESCAPE: 27, HOME: 36, END: 35 }
},
/**
* Used to set max height of the dropdown
*/
_maxHeight: {
type: Number,
},
/**
* Used to set min width of the dropdown
*/
Expand Down Expand Up @@ -181,6 +175,12 @@ class Autocomplete extends PolymerElement {
type: Function,
},
/**
* Maximum height of the dropdown
*/
maxHeight: {
type: Number
},
/**
* Minimum required length of query before searching
*/
minLength: {
Expand Down

0 comments on commit 0042cf5

Please sign in to comment.