Android 如何在react native中大写TextInput中的输入?我无法通过TextField的自动资本化属性将句子、单词或字符大写 import React,{Component}来自'React'; 从“react native”导入{AppRegistry,Text,TextInput,View}; 类PizzaTranslator扩展组件{ 建造师(道具){ 超级(道具); this.state={text:'}; } render(){ 返回( this.setState({text:text})} /> {this.state.text.split('').map((word)=>word&&'

Android 如何在react native中大写TextInput中的输入?我无法通过TextField的自动资本化属性将句子、单词或字符大写 import React,{Component}来自'React'; 从“react native”导入{AppRegistry,Text,TextInput,View}; 类PizzaTranslator扩展组件{ 建造师(道具){ 超级(道具); this.state={text:'}; } render(){ 返回( this.setState({text:text})} /> {this.state.text.split('').map((word)=>word&&',android,reactjs,react-native,Android,Reactjs,React Native,我注意到这只发生在我的三星默认键盘上。我下载了另一个键盘,autoCapitalize正在其他键盘上工作。只需将onChangeText更改为onChangeText={(text)=>this.setState({text:text.toUpperCase()})但为什么自动资本化财产不起作用?这应该起作用! import React, { Component } from 'react'; import { AppRegistry, Text, TextInput, View } fr

我注意到这只发生在我的三星默认键盘上。我下载了另一个键盘,autoCapitalize正在其他键盘上工作。

只需将onChangeText更改为onChangeText={(text)=>this.setState({text:text.toUpperCase()})但为什么自动资本化财产不起作用?这应该起作用!
import React, { Component } from 'react';   
import { AppRegistry, Text, TextInput, View } from 'react-native';

class PizzaTranslator extends Component {
  constructor(props) {
  super(props);
  this.state = {text: ''};
  }
render() {
  return (
    <View style={{padding: 10}}>
      <TextInput
        style={{height: 40}}
        placeholder="Type here to translate!"
        autoCapitalize="characters"