[英]In office ui fabric how can I get default selected value on button click
在我的应用程序中,我使用了 office ui fabric react 下拉控件,当我单击按钮时,我需要检查它是否为空?
public options = [
{ key: 'Employee Name', text: 'Employee Name' },
{ key: 'Employee ID', text: 'Employee ID' },
{ key: 'Department', text: 'Department' }
];
<Dropdown defaultSelectedKey="Employee Name" options={this.options} onChange={this._onChange} />
<input type="button" value="Get Data" id="btnSub" onClick={() => this.readItem()} />
private readItem(): void {
what I need to do here
}
从事件目标中读取值。
(e) => this.readItem(e.value.target)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.