Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/demo-app/select/select-demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class SelectDemo {
{value: 'charizard-1', viewValue: 'Charizard'},
{value: 'squirtle-2', viewValue: 'Squirtle'},
{value: 'pikachu-3', viewValue: 'Pikachu'},
{value: 'eevee-4', viewValue: 'Eevee'},
{value: 'jigglypuff-4', viewValue: 'Jigglypuff with a really long name that will truncate'},
{value: 'ditto-5', viewValue: 'Ditto'},
{value: 'psyduck-6', viewValue: 'Psyduck'},
];
Expand Down Expand Up @@ -120,7 +120,7 @@ export class SelectDemo {
}

setPokemonValue() {
this.currentPokemon = ['eevee-4', 'psyduck-6'];
this.currentPokemon = ['jigglypuff-4', 'psyduck-6'];
}

reassignDrinkByCopy() {
Expand Down
8 changes: 8 additions & 0 deletions src/lib/core/option/_option.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
position: relative;
cursor: pointer;
outline: none;
display: flex;
flex-direction: row;
max-width: 100%;
box-sizing: border-box;
align-items: center;

&[aria-disabled='true'] {
@include user-select(none);
Expand All @@ -35,6 +40,9 @@
// </mat-option>
.mat-option-text {
display: inline-block;
flex-grow: 1;
overflow: hidden;
text-overflow: ellipsis;
}

.mat-option-ripple {
Expand Down
6 changes: 2 additions & 4 deletions src/lib/core/option/option.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<span *ngIf="multiple">
<mat-pseudo-checkbox class="mat-option-pseudo-checkbox"
[state]="selected ? 'checked' : ''" [disabled]="disabled"></mat-pseudo-checkbox>
</span>
<mat-pseudo-checkbox *ngIf="multiple" class="mat-option-pseudo-checkbox"
[state]="selected ? 'checked' : ''" [disabled]="disabled"></mat-pseudo-checkbox>

<span class="mat-option-text"><ng-content></ng-content></span>

Expand Down