on focused text input style react native
You can achieve this by passing in the onFocus and onBlur events to set and unset styles when focused and blurred:
onFocus() {
this.setState({
backgroundColor: 'green'
})
},
onBlur() {
this.setState({
backgroundColor: '#ededed'
})
},
And then, in the TextInput do this:
<TextInput
onBlur={ () => this.onBlur() }
onFocus={ () => this.onFocus() }
style={{ height:60, backgroundColor: this.state.backgroundColor, color: this.state.color }} /><TextInput theme={{ colors: { primary: "color of your wish" } }} />
Also in JavaScript:
- Angular 9 tutorial
- open bootstrap modal using javascript
- hello world javascript
- show ad on facebook game
- angular reactive form get form control template
- col to right bootstrap
- print in javascript
- Setting “checked” for a checkbox with jQuery
- javascript get all characters before a certain one
- convert dictionsr to json file python
- 'React' must be in scope when using JSX react/react-in-jsx-scope
- lodash remove multiple items from array
- ajax request qml
- datepicker range npm reactjs
- javascript range slider
- cordova load javascript without cache
- adonis migration column char
- jest mock implementation
- how to convert a queryset into json string
- javascript read query parameters
- onclick react
- javascript check for null variables
- christmas
- javascript replace multiple spaces with single space