aboutsummaryrefslogtreecommitdiffstats
path: root/src/App.js
diff options
context:
space:
mode:
authorElijah Moore <elimoor@siue.edu>2022-04-14 21:10:27 -0500
committerElijah Moore <elimoor@siue.edu>2022-04-14 21:10:27 -0500
commit0b451806c9a1378ba3381e916d2335c14a15a4cc (patch)
treec45dca345ee4f37f6353888120f6ec038acacb59 /src/App.js
parent5c883e44d832715fc105a3e621a0909ffb0d1f7f (diff)
Terminal tabs completely functional
Diffstat (limited to 'src/App.js')
-rw-r--r--src/App.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/App.js b/src/App.js
index 742bd9e..9217930 100644
--- a/src/App.js
+++ b/src/App.js
@@ -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();