简体   繁体   English

使用语义ui react dropdown时出现`Uncaught TypeError:_this.ref.querySelector不是一个函数`

[英]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.

相关问题 未捕获的TypeError:querySelector不是函数 - Uncaught TypeError: querySelector is not a function 我在 React 上尝试在我的待办事项列表上呈现过滤器功能时收到“未捕获的类型错误:未定义不是函数” - I got an "Uncaught TypeError: undefined is not a function" while trying to render the filter functionality on my todo list on React 未捕获的TypeError:.includes不是React Ref的函数 - Uncaught TypeError: .includes is not a function with React Ref 尝试使用语义 ui 时,我不断收到此错误 Uncaught TypeError: $(...).modal is not a function - When trying to use semantic ui I keep getting this error Uncaught TypeError: $(...).modal is not a function 未捕获的TypeError:undefined在使用jQuery UI时不是一个函数 - Uncaught TypeError: undefined is not a function while using jQuery UI 未捕获的TypeError:playlist.querySelector不是函数 - Uncaught TypeError: playlist.querySelector is not a function 语义 UI 反应,下拉选择 - Semantic UI React, Dropdown Selection React-带有对象的语义ui下拉列表 - React - semantic ui dropdown with object 未捕获的类型错误:database.ref 不是使用 vue 3 的函数 - Uncaught TypeError: database.ref is not a function using vue 3 如何使用按钮清除语义 UI React 中的多选下拉菜单? - How to clear Multiselect Dropdown in Semantic UI React using a button?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM