【发布时间】:2018-07-03 14:42:15
【问题描述】:
我在我的页面上使用 React material-ui SelectField。我无法调整选择字段的高度。这是我的代码 sn-p:
<SelectField
underlineStyle={{
display: 'none'
}}
style={{
width: '49%',
padding: '0 0 5em 5em',
border: '1px solid #ccc',
borderRadius: '5px',
backgroundColor: '#fff',
margin: '16px 0px 0px 28px',
}}
floatingLabelText="Select Stack*"
value={this.state.stack}
onChange={this.handleStackChange.bind(this)}
>
{this.state.dropDownStack}
</SelectField>
我需要降低下拉框的高度,我该怎么做?
【问题讨论】:
-
你想减少到什么程度?您是否尝试添加
height?您能否提供一个您期望的结果示例? -
@Nithyananth 听起来您需要使用引导程序。我推荐你
react-native-elements。对我来说很好! :) -
@FacundoLaRocca 我需要降低 SelectField 区域的高度。请参考附有“选择堆栈作为占位符”的图片
-
您是否尝试在其样式中添加
height? -
@FacundoLaRocca
height没有做任何改变。我试过了。。
标签: reactjs react-native react-router material-ui