question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

openOnClick prop doesn't work

See original GitHub issue

Hi, I don’t want the menu to open on click but only when the user writes some characters that do exist in the options, so I tried to use the openOnClick={false} prop but it didn’t do the job, so I wrapped the Select comp within a span which doesn’t allow it to open and it works, but the problem is that now even when the arrow is clicked it won’t open either,

     dontOpenOnClick = () => {
    this.conditionSelector.select.closeMenu();
  }
   <span onFocus={this.dontOpenOnClick}>
                <Select.Creatable
                  ref={(node) => this.conditionSelector = node}
                />
   </span>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:17 (13 by maintainers)

github_iconTop GitHub Comments

3reactions
JedWatsoncommented, Nov 24, 2017

@elghali It’ll be included in 1.1.0, within the next day or so. I’m just working through the other PRs that might need to be merged into that release first.

2reactions
JedWatsoncommented, Nov 27, 2017

@elghali just published it

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to use window.open onClick - reactjs - Stack Overflow
You can't put plan string in onClick prop. You have to pass a function. Example. <img id='drftrgvlnbpewmcswmcs' style={{cursor:'pointer'}} ...
Read more >
Opening and Closing - Menu - Kendo UI for Angular - Telerik
"click" —The items open on hover but do not close when the mouse pointer leaves the Menu. To close the items and avoid...
Read more >
usability - Should web mega-menus that open OnClick close ...
A particular desktop application I use has a menu that opens on click but closes on mouse out. While it does not have...
Read more >
Introduction to React Prop-Types - SRob's Changelog
Quick and easy runtime type checking for React props. ... expects a prop called openOnClick , which tells the component to open when...
Read more >
Creating circular menus with react-planet | by innFactory GmbH
Alternatively, you can handle the open state from outside with the open , onClick and onClose props. import { Planet } from 'react-planet'; ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found