fix: reset charCount on serial monitor reset

This commit is contained in:
Francesco Stasi 2021-10-15 00:11:26 +02:00
parent 7503739a9f
commit 61262c23ac

View File

@ -71,7 +71,9 @@ export class SerialMonitorOutput extends React.Component<
}); });
this.scrollToBottom(); this.scrollToBottom();
}), }),
this.props.clearConsoleEvent(() => this.setState({ lines: [] })), this.props.clearConsoleEvent(() =>
this.setState({ lines: [], charCount: 0 })
),
this.props.monitorModel.onChange(({ property }) => { this.props.monitorModel.onChange(({ property }) => {
if (property === 'timestamp') { if (property === 'timestamp') {
const { timestamp } = this.props.monitorModel; const { timestamp } = this.props.monitorModel;