Find as a controller
This commit is contained in:
parent
ad1f3c07fb
commit
fcd15f4f09
9 changed files with 78 additions and 75 deletions
|
@ -53,7 +53,7 @@ const enterCommand = async(
|
|||
return hideCommand();
|
||||
};
|
||||
|
||||
const enterFind = (text: string): actions.ConsoleAction => {
|
||||
const enterFind = (text?: string): actions.ConsoleAction => {
|
||||
window.top.postMessage(JSON.stringify({
|
||||
type: messages.CONSOLE_ENTER_FIND,
|
||||
text,
|
||||
|
|
|
@ -38,7 +38,8 @@ class Console extends React.Component<Props> {
|
|||
if (this.props.mode === 'command') {
|
||||
return this.props.dispatch(consoleActions.enterCommand(value));
|
||||
} else if (this.props.mode === 'find') {
|
||||
return this.props.dispatch(consoleActions.enterFind(value));
|
||||
return this.props.dispatch(consoleActions.enterFind(
|
||||
value === '' ? undefined : value));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue