Skip to content

Commit 2fb6925

Browse files
committed
lint
1 parent 12d6bcf commit 2fb6925

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

lib/KeyboardAwareHOC.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ const ScrollIntoViewDefaultOptions: KeyboardAwareHOCOptions = {
121121
// The ref prop name that will be passed to the wrapped component to obtain a ref
122122
// If your ScrollView is already wrapped, maybe the wrapper permit to get a ref
123123
// For example, with glamorous-native ScrollView, you should use "innerRef"
124-
refPropName: "ref",
124+
refPropName: 'ref',
125125
// Sometimes the ref you get is a ref to a wrapped view (ex: Animated.ScrollView)
126126
// We need access to the imperative API of a real native ScrollView so we need extraction logic
127127
extractNativeRef: (ref: Object) => {
@@ -139,7 +139,7 @@ const ScrollIntoViewDefaultOptions: KeyboardAwareHOCOptions = {
139139

140140
function KeyboardAwareHOC(ScrollableComponent: React$Component, userOptions: KeyboardAwareHOCOptions) {
141141

142-
const options: KeyboardAwareHOCOptions = {
142+
const hocOptions: KeyboardAwareHOCOptions = {
143143
...ScrollIntoViewDefaultOptions,
144144
...userOptions,
145145
}
@@ -183,13 +183,13 @@ function KeyboardAwareHOC(ScrollableComponent: React$Component, userOptions: Key
183183

184184
// HOC options are used to init default props, so that these options can be overriden with component props
185185
static defaultProps = {
186-
enableAutomaticScroll: options.enableAutomaticScroll,
187-
extraHeight: options.extraHeight,
188-
extraScrollHeight: options.extraScrollHeight,
189-
enableResetScrollToCoords: options.enableResetScrollToCoords,
190-
keyboardOpeningTime: options.keyboardOpeningTime,
191-
viewIsInsideTabBar: options.viewIsInsideTabBar,
192-
enableOnAndroid: options.enableOnAndroid,
186+
enableAutomaticScroll: hocOptions.enableAutomaticScroll,
187+
extraHeight: hocOptions.extraHeight,
188+
extraScrollHeight: hocOptions.extraScrollHeight,
189+
enableResetScrollToCoords: hocOptions.enableResetScrollToCoords,
190+
keyboardOpeningTime: hocOptions.keyboardOpeningTime,
191+
viewIsInsideTabBar: hocOptions.viewIsInsideTabBar,
192+
enableOnAndroid: hocOptions.enableOnAndroid,
193193
}
194194

195195
constructor(props: KeyboardAwareHOCProps) {
@@ -467,7 +467,7 @@ function KeyboardAwareHOC(ScrollableComponent: React$Component, userOptions: Key
467467
}
468468

469469
_handleRef = (ref: React.Component<*>) => {
470-
this._rnkasv_keyboardView = ref ? options.extractNativeRef(ref) : ref
470+
this._rnkasv_keyboardView = ref ? hocOptions.extractNativeRef(ref) : ref
471471
if (this.props.innerRef) {
472472
this.props.innerRef(this._rnkasv_keyboardView)
473473
}
@@ -496,7 +496,7 @@ function KeyboardAwareHOC(ScrollableComponent: React$Component, userOptions: Key
496496
this.state.keyboardSpace
497497
})
498498
}
499-
const refProps = { [options.refPropName]: this._handleRef }
499+
const refProps = { [hocOptions.refPropName]: this._handleRef }
500500
return (
501501
<ScrollableComponent
502502
{...refProps}
@@ -530,7 +530,7 @@ function KeyboardAwareHOC(ScrollableComponent: React$Component, userOptions: Key
530530
// listenToKeyboardEvents(ScrollView);
531531
// listenToKeyboardEvents(options)(Comp);
532532
const listenToKeyboardEvents = (configOrComp: any) => {
533-
if ( typeof configOrComp === "object" ) {
533+
if ( typeof configOrComp === 'object' ) {
534534
return (Comp: Function) => KeyboardAwareHOC(Comp,configOrComp)
535535
}
536536
else {

0 commit comments

Comments
 (0)