Merge branch 'develop' into feature/react-admin

This commit is contained in:
Matthew Penner 2021-03-05 08:45:39 -07:00
commit d57060dad9
9 changed files with 76 additions and 34 deletions

View file

@ -136,11 +136,12 @@ export default () => {
useEffect(() => {
if (connected && ref.current && !terminal.element) {
terminal.open(ref.current);
terminal.loadAddon(fitAddon);
terminal.loadAddon(searchAddon);
terminal.loadAddon(searchBar);
terminal.loadAddon(webLinksAddon);
terminal.open(ref.current);
fitAddon.fit();
// Add support for capturing keys
@ -160,11 +161,11 @@ export default () => {
}
}, [ terminal, connected ]);
const fit = debounce(() => {
fitAddon.fit();
}, 100);
useEventListener('resize', () => fit());
useEventListener('resize', debounce(() => {
if (terminal.element) {
fitAddon.fit();
}
}, 100));
useEffect(() => {
const listeners: Record<string, (s: string) => void> = {