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.

<Select.Creatable ref={(node) => {this.Selectable= node;}} openOnClick={false} searchable={true} multi={true} />

expected behavior: dropdown doesn’t open onclick event,

real behavior: openOnClick prop is ignored, and the dropdown opens onClick event

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:7
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

18reactions
guerrapcommented, Dec 27, 2018

I think I found another solution, using the prop menuIsOpen, without involving css changes. You have to control the rendering of the menu with menuIsOpen and add custom event handlers for onInputChange, onChange and onBlur: onInputChange you just check if the action performed is input-change and then set openMenu (in the component state) to true; onChange and onBlur events you just hide the menu. Code:

<Select
    inputValue={value}
    onInputChange={this.handleInputChange}
    onChange={this.hideMenu}
    onBlur={this.hideMenu}
    options={dataSource}
    menuIsOpen={openMenu}
/>

handleInputChange = (query, { action }) => {
    if (action === "input-change") {
        this.setState({ openMenu: true });
    }
};

hideMenu = () => {
    this.setState({ openMenu: false });
};
2reactions
TimCannadycommented, Jan 16, 2018

Curious about this, too.

openOnClick={false} only seems to work for the initial click into the input field. Any subsequent clicks will open the control, which is unexpected.

Read more comments on GitHub >

github_iconTop Results From Across the Web

openOnClick - API Reference - Kendo UI Menu - Documentation
openOnClick.subMenuItems Boolean (default: false). Specifies that the sub menus will be opened only on item click. Example. Edit
Read more >
IBM Daeja 4.1.5 - openOnClick parameter
openOnClick parameter. This parameter determines whether IBM® Daeja™ ViewONE redirects the browser to open the specified page when the user clicks the image ......
Read more >
property ExMenu.OpenOnClick as OpenOnClickEnum - Exontrol
The OpenOnClick property specifies the way the user opens the menus. By default, the OpenOnClick property is exClickMenuBar, and so any popup menu...
Read more >
KendoUI Menu link in panel not working when openOnClick is ...
So, when you set openOnClick to true (in opposition to default that is mouse over) what Kendo UI has to do is intercept...
Read more >
Angular (forked) - StackBlitz
import { Component } from '@angular/core'; · import { items } from './items'; · @Component({ · selector: 'my-app', · template: ` · <kendo-menu...
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