Ensure we create a new terminal instance for each new pipe.

- Prevents new session from continuing in the same terminal as an old
  one.
- This is implemented using react's key behaviour at the moment: When
  the key changes, react unmounts and remounts the component and all
  term.js stuff inside of it. Could probably do this more explicitly.
This commit is contained in:
Simon Howe
2016-04-18 09:00:22 +02:00
committed by Tom Wilkie
parent 0396a79d7f
commit 8c4f025fa4

View File

@@ -22,7 +22,7 @@ export default function EmeddedTerminal({pipe, details}) {
// the term.js and creating a new one for the new pipe.
return (
<div className="terminal-embedded" style={style}>
<Terminal pipe={pipe} titleBarColor={titleBarColor}
<Terminal key={pipe.get('id')} pipe={pipe} titleBarColor={titleBarColor}
statusBarColor={statusBarColor} containerMargin={style.right} title={title} />
</div>
);