You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| style | style | {} | Style for the form wrapper |
521
521
522
522
\+ Any other [ScrollView](https://facebook.github.io/react-native/docs/scrollview.html#content) prop you wish to pass.
523
523
524
-
## Widgets
524
+
## Components
525
525
526
526
#### InlineTextInput
527
527
@@ -542,33 +542,33 @@ A wrapper that will manage auto-focusing and auto-scrolling for its children wid
542
542
543
543
\+ Any other [TextInput](https://facebook.github.io/react-native/docs/textinput.html#content) prop you wish to pass.
544
544
545
-
#### Other widgets
545
+
#### Other components
546
546
547
-
My intention is to implement most of [FaridSafi/react-native-gifted-form](https://github.com/FaridSafi/react-native-gifted-form)'s widgets. But I'll do each one only when I need it in a real project, so it might take some time.
547
+
My intention is to implement most of [FaridSafi/react-native-gifted-form](https://github.com/FaridSafi/react-native-gifted-form)'s components. But I'll do each one only when I need it in a real project, so it might take some time.
548
548
549
549
PR's are very much welcome!
550
550
551
-
## Creating new widgets
551
+
## Creating new components
552
552
553
-
Any react component can be rendered inside Stateless Form as a widget. But there is a special case below:
553
+
Any react component can be rendered inside Stateless Form as a component. But there is a special case below:
554
554
555
-
#### Focusable input widgets
555
+
#### Focusable input components
556
556
557
-
If you want your widget to receive focus when previous widget finished editing, you must implement the following pattern:
557
+
If you want your component to receive focus when previous component finished editing, you must implement the following pattern:
558
558
559
-
- Your widget should implement the `focus()` method.
560
-
- Your widget should implement the `blur()` method.
561
-
- Your widget should implement `onSubmitEditing` or equivalent and call `this.props.onNextInputFocus(this.props.nextInput, this)` so StatelessForm can focus the next input or blur the current input.
562
-
- Your widget must have `valid` and `value` on its `propTypes`. This is how `StatelessForm` will recognize it as a focusable and/or scrollable input widget. It is important that only focusable or scrollable widgets have these props on `propTypes`.
559
+
- Your component should implement the `focus()` method.
560
+
- Your component should implement the `blur()` method.
561
+
- Your component should implement `onSubmitEditing` or equivalent and call `this.props.onNextInputFocus(this.props.nextInput, this)` so StatelessForm can focus the next input or blur the current input.
562
+
- Your component must have `valid` and `value` on its `propTypes`. This is how `StatelessForm` will recognize it as a focusable and/or scrollable input component. It is important that only focusable or scrollable components have these props on `propTypes`.
563
563
564
-
#### Scrollable input widgets
564
+
#### Scrollable input components
565
565
566
-
If you want your widget to receive scroll when showing keyboard, you must implement the following pattern:
566
+
If you want your component to receive scroll when showing keyboard, you must implement the following pattern:
567
567
568
-
- Your widget should implement `onFocus` and call `this.props.onFocus(scrollTo)` on focus. `scrollTo` must be your widget's `y` position.
569
-
- You can get your `y` position using `onLayout` prop. Check [InlineTextInput](https://github.com/danielweinmann/react-native-stateless-form/blob/master/widgets/InlineTextInput.js) for references on how to implement it.
570
-
- Your widget should implement `onBlur` and call `this.props.onBlur` on blur.
571
-
- Your widget also must have `valid` and `value` on its `propTypes`.
568
+
- Your component should implement `onFocus` and call `this.props.onFocus(scrollTo)` on focus. `scrollTo` must be your component's `y` position.
569
+
- You can get your `y` position using `onLayout` prop. Check [InlineTextInput](https://github.com/danielweinmann/react-native-stateless-form/blob/master/components/InlineTextInput.js) for references on how to implement it.
570
+
- Your component should implement `onBlur` and call `this.props.onBlur` on blur.
571
+
- Your component also must have `valid` and `value` on its `propTypes`.
0 commit comments