React Native高度自增长的TextInput组件
来源:互联网 发布:2017通货膨胀 知乎 编辑:程序博客网 时间:2024/05/19 16:50
React Native高度自增长的TextInput组件:
直接上代码:
this.state = {
comment:'', //文本输入框内容
placeholder: '说点什么吧~' , //提示内容
height: 40, //文本输入框初始高度
};
comment:'', //文本输入框内容
placeholder: '说点什么吧~' , //提示内容
height: 40, //文本输入框初始高度
};
<TextInput
ref={"INPUT"}
underlineColorAndroid={'transparent'}
autoFocus={false}
placeholder={this.state.placeholder} //提示内容
multiline={true}
onChange={(event)={this.setState({
ref={"INPUT"}
underlineColorAndroid={'transparent'}
autoFocus={false}
placeholder={this.state.placeholder} //提示内容
multiline={true}
onChange={(event)={this.setState({
comment:event.nativeEvent.text,
height:event.nativeEvent.contentSize.height
});
}
}
style={[{height:this.state.height}]}
value={this.state.comment}
/>
value={this.state.comment}
/>
阅读全文
0 0
- [React Native]高度自增长的TextInput组件
- React Native高度自增长的TextInput组件
- React-Native之TextInput实现高度自增长解决方案
- react-native-auto-expanding-textinput 根据输入的内容自增长高度
- React-Native TextInput组件的主要属性
- react native 的TextInput组件问题
- React Native 组件之TextInput
- react native textInput随内容高度设置textinput高度
- React Native的TextInput组件去掉下划线和使用背景图片
- React Native 组件 --TextInput处理文本输入
- React Native学习笔记(3)--TextInput组件
- React Native-8.React Native TextInput组件详解
- React Native组件篇(三) — TextInput组件
- React Native组件(四)TextInput组件解析
- react native TextInput 走过的坑...
- (三)React Native---TextInput
- React-native TextInput初识
- react native ,隐藏TextInput
- 欢迎使用CSDN-markdown编辑器
- 2017/08/24 线程安全
- 学习Opencv2.4.9(四)---SVM支持向量机
- mr2 wordcount 源码解析
- 洛谷 2680 运输计划
- React Native高度自增长的TextInput组件
- 机器学习-学习笔记 学习总结归纳(第十一周)
- 计算机网络,操作系统,数据结构,算法设计,计算机组成原理,数据库,概率论 零散知识库
- python webpy 安装
- 转原始串转义串的网页小工具
- 从github上clone代码
- 并发网
- java序列化实现RMI
- bootstrap datetimepicker 日期时间控间