Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoComplete] Fix ghost clicks on new requests #6907

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/AutoComplete/AutoComplete.js
Expand Up @@ -266,6 +266,9 @@ class AutoComplete extends Component {
};

handleItemTouchTap = (event, child) => {
// Prevent ghost clicks
event.preventDefault();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about exposing a property so it can be implemented on userspace. I'm worried about the side effects here?

Copy link

@max-b max-b Jun 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm working on a similar pull request for #6938 and I'm wondering if you could be a little clearer what you mean here? Would you mean doing something like passing the event object to the exposed onNewRequest property?


const dataSource = this.props.dataSource;
const index = parseInt(child.key, 10);
const chosenRequest = dataSource[index];
Expand Down