-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(autocomplete): add fallback positions (#2726)
- Loading branch information
Showing
10 changed files
with
227 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<template> | ||
<div class="md-autocomplete-panel" role="listbox" [id]="id"> | ||
<div class="md-autocomplete-panel" role="listbox" [id]="id" [ngClass]="_getPositionClass()"> | ||
<ng-content></ng-content> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,28 @@ | ||
@import '../core/style/menu-common'; | ||
|
||
/** | ||
* The max-height of the panel, currently matching md-select value. | ||
* TODO: Check value with MD team. | ||
*/ | ||
$md-autocomplete-panel-max-height: 256px !default; | ||
|
||
/** When in "below" position, the panel needs a slight y-offset to ensure the input underline displays. */ | ||
$md-autocomplete-panel-below-offset: 6px !default; | ||
|
||
/** When in "above" position, the panel needs a larger y-offset to ensure the label has room to display. */ | ||
$md-autocomplete-panel-above-offset: -24px !default; | ||
|
||
.md-autocomplete-panel { | ||
@include md-menu-base(); | ||
|
||
max-height: $md-autocomplete-panel-max-height; | ||
position: relative; | ||
|
||
&.md-autocomplete-panel-below { | ||
top: $md-autocomplete-panel-below-offset; | ||
} | ||
|
||
&.md-autocomplete-panel-above { | ||
top: $md-autocomplete-panel-above-offset; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.