@@ -136,7 +136,7 @@ class ReactTooltip extends React.Component {
136
136
* For unify the bind and unbind listener
137
137
*/
138
138
bind ( methodArray ) {
139
- methodArray . forEach ( ( method ) => {
139
+ methodArray . forEach ( method => {
140
140
this [ method ] = this [ method ] . bind ( this ) ;
141
141
} ) ;
142
142
}
@@ -152,7 +152,7 @@ class ReactTooltip extends React.Component {
152
152
static getDerivedStateFromProps ( nextProps , prevState ) {
153
153
const { ariaProps } = prevState ;
154
154
const newAriaProps = parseAria ( nextProps ) ;
155
- const isChanged = Object . keys ( newAriaProps ) . some ( ( props ) => {
155
+ const isChanged = Object . keys ( newAriaProps ) . some ( props => {
156
156
return newAriaProps [ props ] !== ariaProps [ props ] ;
157
157
} ) ;
158
158
if ( ! isChanged ) {
@@ -247,8 +247,8 @@ class ReactTooltip extends React.Component {
247
247
248
248
// Scan document for shadow DOM elements
249
249
nodeListToArray ( document . getElementsByTagName ( '*' ) )
250
- . filter ( ( element ) => element . shadowRoot )
251
- . forEach ( ( element ) => {
250
+ . filter ( element => element . shadowRoot )
251
+ . forEach ( element => {
252
252
targetArray = targetArray . concat (
253
253
nodeListToArray ( element . shadowRoot . querySelectorAll ( selector ) )
254
254
) ;
@@ -266,7 +266,7 @@ class ReactTooltip extends React.Component {
266
266
const { id, globalEventOff, isCapture } = this . props ;
267
267
const targetArray = this . getTargetArray ( id ) ;
268
268
269
- targetArray . forEach ( ( target ) => {
269
+ targetArray . forEach ( target => {
270
270
if ( target . getAttribute ( 'currentItem' ) === null ) {
271
271
target . setAttribute ( 'currentItem' , 'false' ) ;
272
272
}
@@ -279,7 +279,7 @@ class ReactTooltip extends React.Component {
279
279
if ( this . isBodyMode ( ) ) {
280
280
this . bindBodyListener ( targetArray ) ;
281
281
} else {
282
- targetArray . forEach ( ( target ) => {
282
+ targetArray . forEach ( target => {
283
283
const isCaptureMode = this . isCapture ( target ) ;
284
284
const effect = this . getEffect ( target ) ;
285
285
if ( this . isCustomEvent ( target ) ) {
@@ -320,7 +320,7 @@ class ReactTooltip extends React.Component {
320
320
this . unbindBodyListener ( ) ;
321
321
} else {
322
322
const targetArray = this . getTargetArray ( id ) ;
323
- targetArray . forEach ( ( target ) => {
323
+ targetArray . forEach ( target => {
324
324
this . unbindBasicListener ( target ) ;
325
325
if ( this . isCustomEvent ( target ) ) this . customUnbindListener ( target ) ;
326
326
} ) ;
@@ -382,7 +382,7 @@ class ReactTooltip extends React.Component {
382
382
if ( isGlobalCall ) {
383
383
// Don't trigger other elements belongs to other ReactTooltip
384
384
const targetArray = this . getTargetArray ( this . props . id ) ;
385
- const isMyElement = targetArray . some ( ( ele ) => ele === e . currentTarget ) ;
385
+ const isMyElement = targetArray . some ( ele => ele === e . currentTarget ) ;
386
386
if ( ! isMyElement ) return ;
387
387
}
388
388
// Get the tooltip content
@@ -624,7 +624,7 @@ class ReactTooltip extends React.Component {
624
624
if ( hasTarget ) {
625
625
// Don't trigger other elements belongs to other ReactTooltip
626
626
const targetArray = this . getTargetArray ( this . props . id ) ;
627
- const isMyElement = targetArray . some ( ( ele ) => ele === e . currentTarget ) ;
627
+ const isMyElement = targetArray . some ( ele => ele === e . currentTarget ) ;
628
628
if ( ! isMyElement || ! this . state . show ) return ;
629
629
}
630
630
@@ -742,7 +742,7 @@ class ReactTooltip extends React.Component {
742
742
hasCustomColors ( ) {
743
743
return Boolean (
744
744
Object . keys ( this . state . customColors ) . find (
745
- ( color ) => color !== 'border' && this . state . customColors [ color ]
745
+ color => color !== 'border' && this . state . customColors [ color ]
746
746
) ||
747
747
( this . state . border && this . state . customColors [ 'border' ] )
748
748
) ;
@@ -786,7 +786,7 @@ class ReactTooltip extends React.Component {
786
786
< Wrapper
787
787
className = { `${ wrapperClassName } ` }
788
788
id = { this . props . id || uuid }
789
- ref = { ( ref ) => ( this . tooltipRef = ref ) }
789
+ ref = { ref => ( this . tooltipRef = ref ) }
790
790
{ ...ariaProps }
791
791
data-id = "tooltip"
792
792
dangerouslySetInnerHTML = { { __html : htmlContent } }
@@ -798,7 +798,7 @@ class ReactTooltip extends React.Component {
798
798
className = { `${ wrapperClassName } ` }
799
799
id = { this . props . id || uuid }
800
800
{ ...ariaProps }
801
- ref = { ( ref ) => ( this . tooltipRef = ref ) }
801
+ ref = { ref => ( this . tooltipRef = ref ) }
802
802
data-id = "tooltip"
803
803
>
804
804
< style dangerouslySetInnerHTML = { { __html : style } } />
0 commit comments