From 8f4fda0688b169721405c64f8fd0199fbf5143a7 Mon Sep 17 00:00:00 2001 From: merlin04 Date: Fri, 18 Sep 2020 13:50:35 -0700 Subject: [PATCH] Make setBusy accept a bool --- lib/react-console.js | 4 ++-- main.d.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/react-console.js b/lib/react-console.js index 4349f36..4012118 100644 --- a/lib/react-console.js +++ b/lib/react-console.js @@ -172,8 +172,8 @@ module.exports = _super.call(this, props); this.child = {}; // Command API - this.setBusy = function () { - _this.setState({ acceptInput: false }); + this.setBusy = function (busy) { + _this.setState({ acceptInput: busy }); }; this.getSafeLog = function () { if (!_this.state.log.length) { diff --git a/main.d.ts b/main.d.ts index c318f80..f813fdb 100644 --- a/main.d.ts +++ b/main.d.ts @@ -55,7 +55,7 @@ export default class extends React.Component { logX: (type: string, ...messages: any[]) => void; logTable: (tableObject: object[]) => void; return: () => void; - setBusy: () => void; + setBusy: (busy : boolean) => void; clearScreen: () => void; componentDidMount(): void; focus: () => void;