File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -219,6 +219,9 @@ export class MdSelectionList implements AfterContentInit, OnDestroy {
219
219
/** Subscription to tabbing out from the selection-list. */
220
220
private _tabOutSubscription : Subscription ;
221
221
222
+ /** Subscription to option changes from the selection-list. */
223
+ private _optionSubscription : Subscription ;
224
+
222
225
/** Whether or not the option is selectable. */
223
226
protected _selectable : boolean = true ;
224
227
@@ -260,7 +263,8 @@ export class MdSelectionList implements AfterContentInit, OnDestroy {
260
263
this . _subscribeOptions ( this . options ) ;
261
264
262
265
// When the list changes, re-subscribe
263
- this . options . changes . subscribe ( ( options : QueryList < MdListOption > ) => {
266
+ this . _optionSubscription =
267
+ this . options . changes . subscribe ( ( options : QueryList < MdListOption > ) => {
264
268
this . _subscribeOptions ( options ) ;
265
269
} ) ;
266
270
}
@@ -269,6 +273,10 @@ export class MdSelectionList implements AfterContentInit, OnDestroy {
269
273
if ( this . _tabOutSubscription ) {
270
274
this . _tabOutSubscription . unsubscribe ( ) ;
271
275
}
276
+
277
+ if ( this . _optionSubscription ) {
278
+ this . _optionSubscription . unsubscribe ( ) ;
279
+ }
272
280
}
273
281
274
282
/**
You can’t perform that action at this time.
0 commit comments