From 43f44696ce0774c040c41cb7a582bf8b9886cb7b Mon Sep 17 00:00:00 2001 From: "davidzagi93@gmail.com" Date: Wed, 25 Aug 2021 08:40:38 +0100 Subject: [PATCH] logHtml error --- .../terminal/src/lib/remix-ui-terminal.tsx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx index a7bd53164c..518875aae7 100644 --- a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx +++ b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx @@ -126,7 +126,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { useEffect(() => { scrollToBottom() console.log({ messagesEndRef: messagesEndRef.current }, ' onScroll') - }, [newstate.journalBlocks.length]) + }, [newstate.journalBlocks.length, props.logHtml.length]) function execute (file, cb) { console.log('called execute scriptRunner') @@ -357,8 +357,9 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { setAutoCompleteState(prevState => ({ ...prevState, activeSuggestion: 0, showSuggestions: false, userInput: Object.keys(autoCompletState.data._options[0]).toString() })) } else { console.log(autoCompletState.activeSuggestion, 'autoCompletState.userInput.length') - setAutoCompleteState(prevState => ({ ...prevState, activeSuggestion: 0, showSuggestions: false, userInput: Object.keys(autoCompletState.data._options[autoCompletState.activeSuggestion]).toString() })) + setAutoCompleteState(prevState => ({ ...prevState, activeSuggestion: 0, showSuggestions: false, userInput: inputEl.current.value })) } + console.log({ autoCompletState }, 'autoCompletState') } if (event.which === 13 && !autoCompletState.showSuggestions) { if (event.ctrlKey) { // @@ -1435,11 +1436,11 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { return (
{renderKnownTransactions(trans.tx, trans.receipt, trans.resolvedData, trans.logs, index)}
) }) } else { - return ( -
- {x.message} -
- ) + return x.message.map((x, i) => { + return ( +
{ x }
+ ) + }) } })}