mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-31 02:26:50 +10:00
Document why predictions hover checking is needed
This commit is contained in:
parent
748e772173
commit
a501cbde9a
1 changed files with 6 additions and 1 deletions
|
|
@ -270,7 +270,12 @@ class LocationAutocompleteInput extends Component {
|
|||
// Only render predictions when the input has focus. For
|
||||
// development and easier workflow with the browser devtools, you
|
||||
// might want to hardcode this to `true`. Otherwise the dropdown
|
||||
// list will disappear
|
||||
// list will disappear.
|
||||
//
|
||||
// We also have to check if the predictions have hover to avoid a
|
||||
// click triggering a blur event that hides the predictions before
|
||||
// the click event is sent, resulting in a click to whatever is
|
||||
// rendered below the predictions.
|
||||
const renderPredictions = this.state.inputHasFocus || this.state.predictionsHaveHover;
|
||||
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue