Zeyad Etman
Zeyad Etman

Reputation: 2550

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

here's the full error stack:

enter image description here

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>

Upvotes: 0

Views: 537

Answers (1)

Emnalyeriar
Emnalyeriar

Reputation: 36

I had the same problem:

I was using v0.83 and after updating to the latest version 0.86 everything works fine.

Upvotes: 2

Related Questions