mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 18:20:27 +00:00
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:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user