FaridSafi / FaridSafi/react-native-gifted-form

Values are blank if the SubmitWidget is inside a View

Open
#67 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.4k
Forks
211
PR merge metrics
No merged PRs in 30d

Description

Here is my code. Basically I want to have the SubmitWidget and some other component in the same line. But the values passed to onSubmit function is `{}`. It works if I move the SubmitWidget outside the view.

```
{
this.props.navigator.push(route)
}}
formName={COMMENT_FORM}>



{
if (isValid) {
this.submitComment(values).
then(() => {
GiftedFormManager.reset(COMMENT_FORM);
});
}
}}
/>


SOME OTHER COMPONENT

```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the example with GiftedForm.TextAreaWidget and SubmitWidget nested inside a View, comparing it with SubmitWidget outside the View. Trace how SubmitWidget obtains the form values and verify that onSubmit receives the entered comment in the nested layout; completion means the same values work alongside the other component.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.