Skip to content

Commit 8f36623

Browse files
committed
Provide arguments to noCommandFound argument
1 parent c2ec80b commit 8f36623

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@webscopeio/react-console",
3-
"version": "1.0.7",
3+
"version": "1.0.8",
44
"description": "React component that emulates console behaviour",
55
"author": "jvorcak",
66
"license": "MIT",

src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export type Props = {
1212
commands: any,
1313
welcomeMessage?: string,
1414
autoFocus: boolean,
15-
noCommandFound: (str: string) => Promise<string>,
15+
noCommandFound: (...str: string[]) => Promise<string>,
1616
promptClassName?: string,
1717
}
1818

@@ -94,7 +94,7 @@ export default class ReactConsole extends React.Component<Props, State> {
9494
}
9595

9696
} else {
97-
const cmdNotFound = await this.props.noCommandFound(cmd);
97+
const cmdNotFound = await this.props.noCommandFound(cmd, ...args);
9898
this.setState({
9999
output: [...this.state.output, log, cmdNotFound]
100100
})

0 commit comments

Comments
 (0)