[英]I got `Uncaught TypeError: _this.ref.querySelector is not a function` while using semantic ui react dropdown
I'm using the dropdown menu Floation component, but I got this error 我正在使用下拉菜单“浮动组件”,但出现此错误
Uncaught TypeError: _this.ref.querySelector is not a function 未捕获的TypeError:_this.ref.querySelector不是函数
here's the full error stack: 这是完整的错误堆栈:
and here's my code 这是我的代码
<Button.Group color="teal">
<Button>Save</Button>
<Dropdown
as={Button}
className="icon"
options={[
{ key: 'edit', icon: 'edit', text: 'Edit Post', value: 'edit' },
{
key: 'delete',
icon: 'delete',
text: 'Remove Post',
value: 'delete',
},
{ key: 'hide', icon: 'hide', text: 'Hide Post', value: 'hide' },
]}
trigger={<div ref={ref => (this.input = ref)} />}
/>
</Button.Group>
I had the same problem: 我有同样的问题:
I was using v0.83
and after updating to the latest version 0.86
everything works fine. 我使用的是v0.83
, 更新到最新版本0.86
一切正常。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.