Skip to content

Commit

Permalink
move event listener to button
Browse files Browse the repository at this point in the history
  • Loading branch information
carlinmack committed Apr 18, 2024
1 parent 12c37c3 commit 9ed1204
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export class MultipleOptionsSearchBar extends Component {
<Button
icon
className="right-floated search"
onMouseDown={this.handleOnSearchClick} // not onClick as button moves after focus
onClick={this.handleOnSearchClick}
aria-label={i18next.t("Search")}
>
Expand All @@ -75,7 +76,6 @@ export class MultipleOptionsSearchBar extends Component {
onResultSelect={this.handleOnResultSelect}
onSearchChange={this.handleOnSearchChange}
resultRenderer={(props) => resultRenderer(props, queryString)}
onMouseDown={this.handleOnSearchClick} // not onClick as button moves after focus
results={options}
value={queryString}
placeholder={placeholder}
Expand Down Expand Up @@ -134,6 +134,7 @@ export class MultipleOptionsSearchBarCmp extends Component {
<Button
icon
className="right-floated search"
onMouseDown={this.handleOnSearchClick} // not onClick as button moves after focus
onClick={this.onBtnSearchClick}
aria-label={i18next.t("Search")}
>
Expand All @@ -148,7 +149,6 @@ export class MultipleOptionsSearchBarCmp extends Component {
onResultSelect={this.onBtnSearchClick}
onSearchChange={this.handleOnSearchChange}
resultRenderer={(props) => resultRenderer(props, queryString)}
onMouseDown={this.handleOnSearchClick} // not onClick as button moves after focus
results={options}
value={queryString}
placeholder={placeholder}
Expand Down

0 comments on commit 9ed1204

Please sign in to comment.