Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit 562e0c7

Browse files
gopherkhanvivian-hu-zz
authored andcommitted
feature(autocomplete): Support variable-height autocomplete list items. (#11516)
- introduce 'disable-virtual-repeat' attribute on md-autocomplete component. Component will fall-back to ng-repeat for list rendering. - added demo files to show use of new attirube
1 parent ecf1705 commit 562e0c7

File tree

9 files changed

+904
-39
lines changed

9 files changed

+904
-39
lines changed

src/components/autocomplete/autocomplete-theme.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ md-autocomplete.md-THEME_NAME-theme {
4646
@include md-autocomplete-progress('{{warn-100}}', '{{warn-color}}');
4747
}
4848
}
49-
.md-autocomplete-suggestions-container.md-THEME_NAME-theme {
49+
.md-autocomplete-suggestions-container.md-THEME_NAME-theme,
50+
.md-autocomplete-standard-list-container.md-THEME_NAME-theme {
5051
background: '{{background-hue-1}}';
5152
li {
5253
color: '{{foreground-1}}';

src/components/autocomplete/autocomplete.scss

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ md-autocomplete {
180180
}
181181
}
182182

183-
.md-virtual-repeat-container.md-autocomplete-suggestions-container {
183+
.md-virtual-repeat-container.md-autocomplete-suggestions-container,
184+
.md-standard-list-container.md-autocomplete-suggestions-container {
184185
position: absolute;
185186
box-shadow: 0 2px 5px rgba(black, 0.25);
186187
z-index: $z-index-tooltip;
@@ -194,7 +195,17 @@ md-autocomplete {
194195
}
195196
}
196197

197-
.md-virtual-repeat-container.md-not-found {
198+
.md-standard-list-container {
199+
box-sizing: border-box;
200+
display: block;
201+
margin: 0;
202+
overflow: hidden;
203+
overflow-y: auto;
204+
padding: 0;
205+
}
206+
207+
.md-virtual-repeat-container.md-not-found,
208+
.md-standard-list-container.md-not-found {
198209
height: $md-autocomplete-item-height;
199210
}
200211

0 commit comments

Comments
 (0)