Skip to content

Commit

Permalink
fix: passed invalid ref to measureLayout
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Pader committed Jan 24, 2023
1 parent c37e279 commit 63ff50a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ class Form extends React.Component {

// We subtract 10 to scroll slightly above the input
if (focusInput.measureLayout && typeof focusInput.measureLayout === 'function') {
focusInput.measureLayout(this.form, (x, y) => this.form.scrollTo({y: y - 10, animated: false}));
focusInput.measureLayout(this.formRef.current, (x, y) => this.formRef.current.scrollTo({y: y - 10, animated: false}));
}
}}
containerStyles={[styles.mh0, styles.mt5, styles.flex1]}
Expand Down

0 comments on commit 63ff50a

Please sign in to comment.