Skip to content

Commit 5d50ec7

Browse files
author
swseverance
authored
docs(list): fix single selection example selection display (#19731)
The single selection example was previously rendering `[object Object]` instead of the selected value
1 parent b68ae0d commit 5d50ec7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<mat-selection-list #shoes [multiple]="false">
2-
<mat-list-option *ngFor="let shoe of typesOfShoes">
2+
<mat-list-option *ngFor="let shoe of typesOfShoes" [value]="shoe">
33
{{shoe}}
44
</mat-list-option>
55
</mat-selection-list>
66

77
<p>
8-
Option selected: {{shoes.selectedOptions.selected}}
8+
Option selected: {{shoes.selectedOptions.selected[0]?.value}}
99
</p>

0 commit comments

Comments
 (0)