react-native-clean-form icon indicating copy to clipboard operation
react-native-clean-form copied to clipboard

Text is dessapearing when I try to type

Open Gerald17 opened this issue 7 years ago • 9 comments

Text automatically is deleted (i.e. reverts back to the placeholder) when I type something. I'm working on android, any ideas?

Gerald17 avatar Apr 21 '17 20:04 Gerald17

I'm having this same issue. @Gerald17, did you find a solution?

crjackso avatar May 20 '17 20:05 crjackso

Hi @crjackso

Not really for this. Its a weird issue but I replace this form with this https://github.com/halilb/react-native-textinput-effects/blob/master/README.md it has some cool effects for inputs and you can use state to handle data

Gerald17 avatar May 20 '17 20:05 Gerald17

Sorry work and my little kids take a lot of time actually ... but try to look on the issues.

markusguenther avatar May 22 '17 12:05 markusguenther

Don't worry, still is really good form. I'll try to fix it too

Gerald17 avatar May 22 '17 13:05 Gerald17

I have the same issue, text disappers all the time, as well as selections from select

sejsworld avatar Aug 22 '17 14:08 sejsworld

Maybe from not wiring up the form reducer when using redux-form. I do this sometimes.

clay-morgan avatar Aug 31 '17 00:08 clay-morgan

I can confirm that this behaviour is caused by not wiring up redux-form correctly, and basically not using the provided reducer in your redux store.

An example of how to wire up redux-form correctly is in the example, specifically here. You can install the non-immutable reducer as follows:

import { reducer as form } from 'redux-form'

const reducer = combineReducers({ form })
const store = createStore(reducer, {})

If you use redux-form for your Form, it will use the information it finds in Redux to populate the form fields. If you didn't install the reducer, then the state in Redux will stay perpetually empty, and this empty state will be transmitted to your form fields, which will manifest itself by disappearing the text as you type it. Mystery solved 😉 Hope this helps someone.

infostreams avatar May 10 '18 09:05 infostreams

I actually think this issue can be closed...

infostreams avatar May 10 '18 09:05 infostreams

yeah the reason text was disappearing is because you didnt have the reducer form setup so redux had nowhere to put the data

The-Code-Monkey avatar May 25 '18 09:05 The-Code-Monkey