nitin42 / terminal-in-react

👨‍💻 A component that renders a terminal
http://terminal-in-react.surge.sh/
MIT License
2.12k stars 151 forks source link

Await async functions on commandPassThrough #84

Closed caioedut closed 2 years ago

caioedut commented 4 years ago

I just need to block user input while the async function has not ended.

luisgrases commented 2 years ago

this might help:

  const hideInput = () => {
    terminalRef.current.state.instances[0].instance.inputWrapper.style.display =
      "none";
  };

  const showInput = () => {
    terminalRef.current.state.instances[0].instance.inputWrapper.style.display =
      "block";
  };