diff options
author | Elijah Moore <elimoor@siue.edu> | 2022-04-14 21:10:27 -0500 |
---|---|---|
committer | Elijah Moore <elimoor@siue.edu> | 2022-04-14 21:10:27 -0500 |
commit | 0b451806c9a1378ba3381e916d2335c14a15a4cc (patch) | |
tree | c45dca345ee4f37f6353888120f6ec038acacb59 /src/App.js | |
parent | 5c883e44d832715fc105a3e621a0909ffb0d1f7f (diff) |
Terminal tabs completely functional
Diffstat (limited to 'src/App.js')
-rw-r--r-- | src/App.js | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -250,8 +250,8 @@ class TerminalComponent extends React.Component { }, }); this.isConnecting = false; - this.isVisible = true; this.key = (new Date().getMilliseconds()).toString(); + this.terminalId = "xterm" + this.key; } componentDidMount() { @@ -263,7 +263,7 @@ class TerminalComponent extends React.Component { console.log(" About to load xterm interior"); this.term.loadAddon(this.fitAddon); console.log("this.term.loadAddon(this.fitAddon);"); - this.term.open(document.getElementById("xterm")); + this.term.open(document.getElementById(this.terminalId)); console.log("this.term.open(document.getElementById('xterm'));"); console.log(this.term); this.fitAddon.fit(); @@ -324,7 +324,7 @@ class TerminalComponent extends React.Component { render() { return ( <div className="terminalContainer" > - <div id="xterm" style={{ height: "100%", width: "100%" }} /> + <div id={this.terminalId} style={{ height: "100%", width: "100%" }} /> <ResizeObserver onResize={() => { this.fitAddon.fit(); |