зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1591446 - Use right context when closing project file search, r=jlast.
Differential Revision: https://phabricator.services.mozilla.com/D50620 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
40a83cda81
Коммит
e35cbe03a4
|
@ -295,7 +295,7 @@ export class ProjectSearch extends Component<Props, State> {
|
|||
}
|
||||
|
||||
renderInput() {
|
||||
const { status } = this.props;
|
||||
const { cx, closeProjectSearch, status } = this.props;
|
||||
return (
|
||||
<SearchInput
|
||||
query={this.state.inputValue}
|
||||
|
@ -310,10 +310,7 @@ export class ProjectSearch extends Component<Props, State> {
|
|||
onBlur={() => this.setState({ inputFocused: false })}
|
||||
onKeyDown={this.onKeyDown}
|
||||
onHistoryScroll={this.onHistoryScroll}
|
||||
handleClose={
|
||||
// TODO - This function doesn't quite match the signature.
|
||||
(this.props.closeProjectSearch: any)
|
||||
}
|
||||
handleClose={() => closeProjectSearch(cx)}
|
||||
ref="searchInput"
|
||||
/>
|
||||
);
|
||||
|
|
|
@ -13,7 +13,7 @@ exports[`ProjectSearch found no search results 1`] = `
|
|||
<SearchInput
|
||||
count={0}
|
||||
expanded={false}
|
||||
handleClose={[MockFunction]}
|
||||
handleClose={[Function]}
|
||||
hasPrefix={false}
|
||||
isLoading={false}
|
||||
onBlur={[Function]}
|
||||
|
@ -116,7 +116,7 @@ exports[`ProjectSearch found search results 1`] = `
|
|||
<SearchInput
|
||||
count={5}
|
||||
expanded={false}
|
||||
handleClose={[MockFunction]}
|
||||
handleClose={[Function]}
|
||||
hasPrefix={false}
|
||||
isLoading={false}
|
||||
onBlur={[Function]}
|
||||
|
@ -169,11 +169,11 @@ exports[`ProjectSearch found search results 1`] = `
|
|||
</div>
|
||||
<CloseButton
|
||||
buttonClass="big"
|
||||
handleClick={[MockFunction]}
|
||||
handleClick={[Function]}
|
||||
>
|
||||
<button
|
||||
className="close-btn big"
|
||||
onClick={[MockFunction]}
|
||||
onClick={[Function]}
|
||||
>
|
||||
<AccessibleImage
|
||||
className="close"
|
||||
|
@ -747,7 +747,7 @@ exports[`ProjectSearch should display loading message while search is in progres
|
|||
<SearchInput
|
||||
count={0}
|
||||
expanded={false}
|
||||
handleClose={[MockFunction]}
|
||||
handleClose={[Function]}
|
||||
hasPrefix={false}
|
||||
isLoading={true}
|
||||
onBlur={[Function]}
|
||||
|
@ -786,7 +786,7 @@ exports[`ProjectSearch showErrorEmoji false if not done & no results 1`] = `
|
|||
<SearchInput
|
||||
count={0}
|
||||
expanded={false}
|
||||
handleClose={[MockFunction]}
|
||||
handleClose={[Function]}
|
||||
hasPrefix={false}
|
||||
isLoading={true}
|
||||
onBlur={[Function]}
|
||||
|
@ -825,7 +825,7 @@ exports[`ProjectSearch showErrorEmoji false if not done & results 1`] = `
|
|||
<SearchInput
|
||||
count={5}
|
||||
expanded={false}
|
||||
handleClose={[MockFunction]}
|
||||
handleClose={[Function]}
|
||||
hasPrefix={false}
|
||||
isLoading={true}
|
||||
onBlur={[Function]}
|
||||
|
@ -872,7 +872,7 @@ exports[`ProjectSearch turns off shortcuts on unmount 1`] = `
|
|||
<SearchInput
|
||||
count={0}
|
||||
expanded={false}
|
||||
handleClose={[MockFunction]}
|
||||
handleClose={[Function]}
|
||||
hasPrefix={false}
|
||||
isLoading={false}
|
||||
onBlur={[Function]}
|
||||
|
@ -906,7 +906,7 @@ exports[`ProjectSearch where <Enter> has not been pressed 1`] = `
|
|||
<SearchInput
|
||||
count={0}
|
||||
expanded={false}
|
||||
handleClose={[MockFunction]}
|
||||
handleClose={[Function]}
|
||||
hasPrefix={false}
|
||||
isLoading={false}
|
||||
onBlur={[Function]}
|
||||
|
|
Загрузка…
Ссылка в новой задаче