File tree Expand file tree Collapse file tree 3 files changed +27
-18
lines changed Expand file tree Collapse file tree 3 files changed +27
-18
lines changed Original file line number Diff line number Diff line change 14
14
< input mdInput placeholder ="Input " value ="Text Input ">
15
15
</ md-form-field >
16
16
| Text 5 |
17
- < md-select placeholder ="Select ">
18
- < md-option value ="option "> Option</ md-option >
19
- </ md-select >
17
+ < md-form-field >
18
+ < md-select placeholder ="Select ">
19
+ < md-option value ="option "> Option</ md-option >
20
+ < md-option value ="long "> This option is really really really long</ md-option >
21
+ </ md-select >
22
+ </ md-form-field >
20
23
| Text 6 |
21
24
< md-form-field >
22
25
< textarea mdInput placeholder ="Input " mdTextareaAutosize > Textarea Line 2</ textarea >
42
45
< input mdInput placeholder ="Input " value ="Text Input ">
43
46
</ md-form-field >
44
47
| Text 5 |
45
- < md-select placeholder ="Select ">
46
- < md-option value ="option "> Option</ md-option >
47
- </ md-select >
48
+ < md-form-field >
49
+ < md-select placeholder ="Select ">
50
+ < md-option value ="option "> Option</ md-option >
51
+ < md-option value ="long "> This option is really really really long</ md-option >
52
+ </ md-select >
53
+ </ md-form-field >
48
54
| Text 6 |
49
55
< md-form-field >
50
56
< textarea mdInput placeholder ="Input " mdTextareaAutosize > Textarea Line 2</ textarea >
Original file line number Diff line number Diff line change 1
1
< div #trigger #origin ="cdkOverlayOrigin " cdk-overlay-origin class ="mat-select-trigger "
2
2
aria-hidden ="true " (click) ="toggle() ">
3
- < span class ="mat-select-value ">
3
+ < div class ="mat-select-value ">
4
4
< div #measureFontSize class ="mat-select-measure-font-size " aria-hidden ="true "> </ div >
5
+ < ng-container *ngIf ="empty "> </ ng-container >
5
6
< span class ="mat-select-value-text " *ngIf ="!empty " [ngSwitch] ="!!customTrigger ">
6
7
< span *ngSwitchDefault > {{ triggerValue }}</ span >
7
8
< ng-content select ="md-select-trigger, mat-select-trigger " *ngSwitchCase ="true "> </ ng-content >
8
9
</ span >
9
- </ span >
10
+ </ div >
10
11
11
- < span class ="mat-select-arrow "> </ span >
12
+ < div class ="mat-select-arrow-wrapper "> < div class =" mat-select-arrow " > </ div > </ div >
12
13
</ div >
13
14
14
15
< ng-template
Original file line number Diff line number Diff line change 4
4
@import ' ../core/style/vendor-prefixes' ;
5
5
@import ' ../core/a11y/a11y' ;
6
6
7
- $mat-select-trigger-min-width : 112px !default ;
8
7
$mat-select-arrow-size : 5px !default ;
9
8
$mat-select-arrow-margin : 4px !default ;
10
9
$mat-select-panel-max-height : 256px !default ;
@@ -16,15 +15,12 @@ $mat-select-item-height: 3em !default;
16
15
17
16
// Inside of a form field we want it to expand to take the available space.
18
17
.mat-form-field & {
19
- display : block ;
20
18
width : 100% ;
21
19
}
22
20
}
23
21
24
22
.mat-select-trigger {
25
- display : flex ;
26
- align-items : center ;
27
- min-width : $mat-select-trigger-min-width ;
23
+ display : inline-table ;
28
24
cursor : pointer ;
29
25
position : relative ;
30
26
box-sizing : border-box ;
@@ -36,16 +32,22 @@ $mat-select-item-height: 3em !default;
36
32
}
37
33
38
34
.mat-select-value {
39
- display : flex ;
40
- flex : auto ;
41
- align-items : center ;
42
- min-width : 0 ;
35
+ display : table-cell ;
36
+ max-width : 0 ;
37
+ width : 100% ;
38
+ overflow : hidden ;
39
+ text-overflow : ellipsis ;
43
40
}
44
41
45
42
.mat-select-value-text {
46
43
@include mat-truncate-line ();
47
44
}
48
45
46
+ .mat-select-arrow-wrapper {
47
+ display : table-cell ;
48
+ vertical-align : middle ;
49
+ }
50
+
49
51
.mat-select-arrow {
50
52
width : 0 ;
51
53
height : 0 ;
You can’t perform that action at this time.
0 commit comments