textinput

Change style when TextInput onFocus and onBlur.React-Native

元气小坏坏 提交于 2020-08-26 07:07:53
问题 I have 40 TextInput in 5 page and need to change input text color onfocus:'white' and onBlur:'gray' I know how make it for single input.But I need for multiple input <TextInput clearTextOnFocus={true} keyboardType="number-pad" style={[this.state.isFocused?styles.inputOnFocus:styles.input]} onChangeText={v=>handleInput('value',v)} value={this.state.value} onFocus={()=>this.setState({isFocused:true})} onBlur={()=>this.setState({isFocused:false})} /> 回答1: You can simply give each one of the

Get value of input text with react-bootstrap

自作多情 提交于 2020-07-20 17:00:27
问题 I try to get value into a input text and add it to a text area with react-bootstrap. I know I must use ReactDOM.findDOMNode to get value with ref. I don't understand what is wrong. Here my code : import React from 'react'; import logo from './logo.svg'; import ReactDOM from 'react-dom'; import { InputGroup, FormGroup, FormControl, Button} from 'react-bootstrap'; import './App.css'; class InputMessages extends React.Component { constructor(props) { super(props); this.handleChange = this

How to display items on screen using search textinput (expo, react-native)

£可爱£侵袭症+ 提交于 2020-06-17 15:51:49
问题 I am using react native and expo. I have some JSON data on the screen (iOS) simulator that was fetched from API. At the top, I have a search bar where users can search the data that is displayed on the screen. For example, if the data is A a company B bcompany A is a company symbol and a company is a symbol name. So when user types A it should display A company and if user type Z it should display Z company. My code: import React, { useState, useEffect } from "react"; import { StyleSheet,

How to display items on screen using search textinput (expo, react-native)

安稳与你 提交于 2020-06-17 15:51:15
问题 I am using react native and expo. I have some JSON data on the screen (iOS) simulator that was fetched from API. At the top, I have a search bar where users can search the data that is displayed on the screen. For example, if the data is A a company B bcompany A is a company symbol and a company is a symbol name. So when user types A it should display A company and if user type Z it should display Z company. My code: import React, { useState, useEffect } from "react"; import { StyleSheet,

How to display items on screen using search textinput (expo, react-native)

随声附和 提交于 2020-06-17 15:51:14
问题 I am using react native and expo. I have some JSON data on the screen (iOS) simulator that was fetched from API. At the top, I have a search bar where users can search the data that is displayed on the screen. For example, if the data is A a company B bcompany A is a company symbol and a company is a symbol name. So when user types A it should display A company and if user type Z it should display Z company. My code: import React, { useState, useEffect } from "react"; import { StyleSheet,

Kivy: Can't update text input value from another class

一个人想着一个人 提交于 2020-06-17 09:36:14
问题 I'm new on kivy .I'm trying to change text input value (the string value that is shown in TextInput box) from another class, But nothing passes. I have following widgets in class MyFirstScreen : One RecycleView with multiple items (each item is a dictionary ) Two TextInput s What I want to do: When each items in RecycleView selected, TextInput s should be update and load with corresponding values of selected item's dictionary . But when i try to access current TextInput 's value from another

react-native TextInput displays wrong when changing height on Android

痴心易碎 提交于 2020-06-09 12:14:13
问题 I have a TextInput with the following style: amountInput: { flex: 1, backgroundColor: 'rgba(255, 255, 255, 0.1)', color: 'rgba(255, 255, 255, 0.9)', }, On iOS it correctly looks like it doesn't have enough padding: On Android is has enormous padding by default: Not a problem - I'll set a right and left padding, and a height: amountInput: { flex: 1, backgroundColor: 'rgba(255, 255, 255, 0.1)', height: 30, paddingRight: 5, paddingLeft: 5, color: 'rgba(255, 255, 255, 0.9)', } Looks good on iOS:

react-native TextInput displays wrong when changing height on Android

99封情书 提交于 2020-06-09 12:13:51
问题 I have a TextInput with the following style: amountInput: { flex: 1, backgroundColor: 'rgba(255, 255, 255, 0.1)', color: 'rgba(255, 255, 255, 0.9)', }, On iOS it correctly looks like it doesn't have enough padding: On Android is has enormous padding by default: Not a problem - I'll set a right and left padding, and a height: amountInput: { flex: 1, backgroundColor: 'rgba(255, 255, 255, 0.1)', height: 30, paddingRight: 5, paddingLeft: 5, color: 'rgba(255, 255, 255, 0.9)', } Looks good on iOS:

React Native “keyboardDismissMode” at FlatList

ⅰ亾dé卋堺 提交于 2020-05-15 10:37:39
问题 Is there any possibility to prevent the keyboard from dismissing when scrolling a FlatList ? When using a ScrollView setting the prop "keyboardDismissMode" to "none" is the solution to this problem, but this doesn't work for me at a FlatList... I use the FlatList inside a self-made component, that is in a Stack-Navigator, while there is a focussed TextInput in its header. I render the FlatList like this: <View style={{flex: 1}}> <FlatList style={{flex: 1}} data={this.props.data} keyExtractor=