@@ -259,7 +259,10 @@ export class MdcChip implements AfterViewInit, OnDestroy {
259259 }
260260 } ,
261261 eventTargetHasClass : ( target : HTMLElement , className : string ) => target . classList . contains ( className ) ,
262- notifyInteraction : ( ) => this . _emitSelectionChangeEvent ( ) ,
262+ notifyInteraction : ( ) => {
263+ this . selected = ! this . selected ;
264+ this . _emitSelectionChangeEvent ( ) ;
265+ } ,
263266 notifyTrailingIconInteraction : ( ) => this . trailingIconInteraction . emit ( { detail : { chipId : this . id } } ) ,
264267 notifyRemoval : ( ) => this . removed . emit ( { detail : { chipId : this . id , root : this } } ) ,
265268 getComputedStyleValue : ( propertyName : string ) => {
@@ -277,7 +280,7 @@ export class MdcChip implements AfterViewInit, OnDestroy {
277280 beginExit ( ) : void ,
278281 setSelected ( selected : boolean ) : void ,
279282 setShouldRemoveOnTrailingIconClick ( shouldRemove : boolean ) : void ,
280- handleInteraction ( evt : Event ) : void ,
283+ handleInteraction ( evt : KeyboardEvent | MouseEvent ) : void ,
281284 handleTransitionEnd ( evt : TransitionEvent ) : void ,
282285 handleTrailingIconInteraction ( evt : Event ) : void
283286 } = new MDCChipFoundation ( this . createAdapter ( ) ) ;
@@ -319,8 +322,7 @@ export class MdcChip implements AfterViewInit, OnDestroy {
319322
320323 private _loadListeners ( ) : void {
321324 this . _chipInteractionEventSubscription = this . chipInteractionEvents . pipe ( )
322- . subscribe ( evt => {
323- this . selected = ! this . selected ;
325+ . subscribe ( ( evt : KeyboardEvent | MouseEvent ) => {
324326 this . _foundation . handleInteraction ( evt ) ;
325327 } ) ;
326328
0 commit comments