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.

Suggest: rightElement click

See original GitHub issue

Environment

  • Package version(s): blueprintjs/select 3.7.0
  • Browser and OS versions: Chrome 72 in Windows 10

Question

Hi,

I am uisng a Suggest component with a right icon. I passed a rightElement prop to the input in order to add an icon in the right side of it. However, clicking in this icon, nothing happens. How can I easily avoid that the icon catches the click button letting the input handle that event (and achieve the same experience of clicking in the other parts of the input) ? I could do it controlling manually when the popover is expanded or not but I would like to avoid that.

   const ColorSuggest = Suggest.ofType<IColor>();

    const icon = <Icon icon="chevron-down" onClick={this.onArrowClick} />;
    return (
      <>
      <ColorSuggest
        items={this.state.colors}
        itemPredicate={filterColor}
        itemRenderer={renderColor}
        onItemSelect={(color: IColor) => {console.log("On item select. Name = " + color.name);}}
        inputValueRenderer={this.renderInputValue}
        popoverProps={{minimal: true}}
        inputProps={{placeholder:"Search", className:"dropdown", rightElement: icon}}
      >        
      </ColorSuggest>
      </>
    );

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
adidahiyacommented, Sep 30, 2019

You can apply the CSS pointer-events: none to the icon to make hover / click events pass through to the input below. Let me know if that works out, and we can consider adding this advice to the documentation.

0reactions
romanrcommented, Nov 2, 2021

This should be classified a bug. You click on input field and it does not receive focus. How is this not a bug?

Read more comments on GitHub >

github_iconTop Results From Across the Web

(React-redux) BlueprintJs Suggest cannot backspace in input ...
Solution: Create a new dialog input every time the user makes a selection, so the user can continue to make selections and edits....
Read more >
Detecting the right element - Userpilot Knowledge Base
You can find the HTML content and related CSS selectors are used as a particular element by simply right-clicking and inspecting that element....
Read more >
Selecting the right element - Chameleon Help Center
Whenever there is the opportunity to Select an element, you will see the same point-and-click flow. Hover your mouse over the structure of...
Read more >
What is the best way to indicate a web page element has right ...
I am building a rich web application and most UI elements will have context menus with applicable actions on right click. What would...
Read more >
Inspecting an element selects the <body> element before the ...
To reproduce the issue right-click this text and choose 'Inspect Element' from ... While the last 2 comments indicate that the right node...
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