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
feat(core): implement advanced keyboard management and fix monorepo b… (#3)
* feat(core): implement advanced keyboard management and fix monorepo bundling
This commit introduces several new props to FieldForm (autoScroll, chainEnabled, autoReturnKeyType, dismissKeyboardOnTap, etc.) and resolves bundling issues in the monorepo showcase app by hoisting runtime polyfills to the project root.
* feat: add field skipping, Reanimated keyboard support, and optional submit-on-done behavior to FieldForm
* docs: update README with performance details, default padding, and new field skip/submit props
Copy file name to clipboardExpand all lines: README.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -161,6 +161,9 @@ At the same time, every `FieldInput` registers itself into an ordered focus chai
161
161
162
162
Nothing about this requires native modules. It is entirely JS-side and works on Expo, bare RN, and the New Architecture.
163
163
164
+
### ⚡ 60fps Native Performance
165
+
**FieldFlow** strictly requires [`react-native-reanimated`](https://docs.swmansion.com/react-native-reanimated/) as a peer dependency. By mandating Reanimated, the library delegates all keyboard layout tracking to a high-performance C++ worklet via `useAnimatedKeyboard()`. This completely bypasses the JavaScript bridge during animations, resulting in maximum UI thread performance (smooth 60fps) during heavy keyboard pan gestures that would otherwise stutter on the JS thread.
166
+
164
167
---
165
168
166
169
## API
@@ -170,9 +173,10 @@ Nothing about this requires native modules. It is entirely JS-side and works on
170
173
| Prop | Type | Default | Description |
171
174
|------|------|---------|-------------|
172
175
|`onSubmit`|`() => void`| — | Called when the last field is submitted |
173
-
|`extraScrollPadding`|`number`|`100`| Space between the active field and the keyboard top edge |
176
+
|`extraScrollPadding`|`number`|`40`| Space between the active field and the keyboard top edge |
174
177
|`scrollable`|`boolean`|`true`| Wrap children in a managed ScrollView |
175
178
|`avoidKeyboard`|`boolean`|`true`| Enable the animated keyboard spacer |
179
+
|`submitOnLastFieldDone`|`boolean`|`false`| Submit the whole form / call `onSubmit` when "Done" is pressed on the final field |
176
180
|`style`|`ViewStyle`| — | Container style |
177
181
|`scrollViewProps`|`ScrollViewProps`| — | Forwarded to the internal ScrollView |
178
182
|`onKeyboardShow`|`(height: number) => void`| — | Called when keyboard appears |
@@ -184,7 +188,7 @@ Accepts every `TextInput` prop, plus:
184
188
185
189
| Prop | Type | Default | Description |
186
190
|------|------|---------|-------------|
187
-
|`shouldIgnoreChain`|`boolean`|`false`| Exclude this field from the focus chain |
191
+
|`skip`|`boolean`|`false`| Exclude this field from the auto-focus chain entirely|
188
192
|`nextRef`|`RefObject<TextInput>`| — | Override: focus this ref instead of the auto-detected next field |
189
193
|`onFormSubmit`|`() => void`| — | Override: called when this field is the last and Done is tapped |
<summary><b>Can I skip a field in the chain?</b></summary>
305
309
<br/>
306
310
307
-
Yes. Add `shouldIgnoreChain` to any `FieldInput` and the focus chain skips over it as if it doesn't exist. The field is still fully functional — it just doesn't participate in Next/Done handling.
311
+
Yes. Add `skip={true}` to any `FieldInput` and the focus chain skips over it dynamically. The field is still fully functional — it just doesn't participate in Next/Done handling.
0 commit comments