File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -77,27 +77,29 @@ class LibraryComponent extends React.Component {
77
77
selectedTag : tag . toLowerCase ( )
78
78
} ) ;
79
79
} else {
80
- const playingId = this . state . playingItem ;
80
+ this . props . onItemMouseLeave ( this . getFilteredData ( ) [ [ this . state . playingItem ] ] ) ;
81
81
this . setState ( {
82
82
filterQuery : '' ,
83
83
playingItem : null ,
84
84
selectedTag : tag . toLowerCase ( )
85
- } , this . props . onItemMouseLeave ( this . getFilteredData ( ) [ [ playingId ] ] ) ) ;
85
+ } ) ;
86
86
}
87
87
}
88
88
handleMouseEnter ( id ) {
89
89
// don't restart if mouse over already playing item
90
90
if ( this . props . onItemMouseEnter && this . state . playingItem !== id ) {
91
+ this . props . onItemMouseEnter ( this . getFilteredData ( ) [ id ] ) ;
91
92
this . setState ( {
92
93
playingItem : id
93
- } , this . props . onItemMouseEnter ( this . getFilteredData ( ) [ id ] ) ) ;
94
+ } ) ;
94
95
}
95
96
}
96
97
handleMouseLeave ( id ) {
97
98
if ( this . props . onItemMouseLeave ) {
99
+ this . props . onItemMouseLeave ( this . getFilteredData ( ) [ id ] ) ;
98
100
this . setState ( {
99
101
playingItem : null
100
- } , this . props . onItemMouseLeave ( this . getFilteredData ( ) [ id ] ) ) ;
102
+ } ) ;
101
103
}
102
104
}
103
105
handlePlayingEnd ( ) {
@@ -114,12 +116,12 @@ class LibraryComponent extends React.Component {
114
116
selectedTag : ALL_TAG . tag
115
117
} ) ;
116
118
} else {
117
- const playingId = this . state . playingItem ;
119
+ this . props . onItemMouseLeave ( this . getFilteredData ( ) [ [ this . state . playingItem ] ] ) ;
118
120
this . setState ( {
119
121
filterQuery : event . target . value ,
120
122
playingItem : null ,
121
123
selectedTag : ALL_TAG . tag
122
- } , this . props . onItemMouseLeave ( this . getFilteredData ( ) [ [ playingId ] ] ) ) ;
124
+ } ) ;
123
125
}
124
126
}
125
127
handleFilterClear ( ) {
You can’t perform that action at this time.
0 commit comments