我需要_dropdown_select()
在我的代码中发生另一个事件时更改方法。我在我的本机应用程序中使用sohobloo/react-native-modal-dropdown。我尝试将此作为<ModalDropdown>
标签上的属性:select={(idx)=> this._dropdown_select(idx).bind(this)}
还有我的方法:
_dropdown_select(idx){
return idx;
}
我这样称呼它:this._dropdown_select(0);
在另一种方法中
答案是从插件制造商那里调用您的方法上的下拉列表引用的 select(idx)。可以在这里找到。例子:this.refs.dropDown.select(-1)
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句