Fix value preview update

This commit is contained in:
Thomas Nordquist
2019-04-15 11:35:13 +02:00
parent fa54b9a9fa
commit daac8cf949
3 changed files with 6 additions and 6 deletions

View File

@@ -125,7 +125,7 @@ class Sidebar extends React.Component<Props, State> {
<Topic node={this.props.node} didSelectNode={this.updateNode} /> <Topic node={this.props.node} didSelectNode={this.updateNode} />
</ExpansionPanelDetails> </ExpansionPanelDetails>
</ExpansionPanel> </ExpansionPanel>
{<ValuePanel />} <ValuePanel lastUpdate={this.props.node ? this.props.node.lastUpdate : 0} />
<ExpansionPanel defaultExpanded={true}> <ExpansionPanel defaultExpanded={true}>
<ExpansionPanelSummary expandIcon={<ExpandMore />} style={summaryStyle}> <ExpansionPanelSummary expandIcon={<ExpandMore />} style={summaryStyle}>
<Typography className={classes.heading}>Publish</Typography> <Typography className={classes.heading}>Publish</Typography>

View File

@@ -1,12 +1,11 @@
import * as q from '../../../../../backend/src/Model' import * as q from '../../../../../backend/src/Model'
import * as React from 'react' import * as React from 'react'
import BarChart from '@material-ui/icons/BarChart' import BarChart from '@material-ui/icons/BarChart'
import Copy from '../../helper/Copy'
import DateFormatter from '../../helper/DateFormatter' import DateFormatter from '../../helper/DateFormatter'
import History from '../HistoryDrawer' import History from '../HistoryDrawer'
import { TopicViewModel } from '../../../model/TopicViewModel'
import { Base64Message } from '../../../../../backend/src/Model/Base64Message' import { Base64Message } from '../../../../../backend/src/Model/Base64Message'
import Copy from '../../helper/Copy'; import { TopicViewModel } from '../../../model/TopicViewModel'
import { selectTextWithCtrlA } from '../../../utils/handleTextSelectWithCtrlA';
const PlotHistory = React.lazy(() => import('./PlotHistory')) const PlotHistory = React.lazy(() => import('./PlotHistory'))
@@ -24,10 +23,10 @@ interface State {
} }
class MessageHistory extends React.Component<Props, State> { class MessageHistory extends React.Component<Props, State> {
private updateNode = throttle(() => { private updateNode = throttle(() => {
this.setState(this.state) this.setState(this.state)
}, 300) }, 300)
constructor(props: any) { constructor(props: any) {
super(props) super(props)
this.state = {} this.state = {}

View File

@@ -35,6 +35,7 @@ interface Props {
sidebarActions: typeof sidebarActions sidebarActions: typeof sidebarActions
settingsActions: typeof settingsActions settingsActions: typeof settingsActions
classes: any classes: any
lastUpdate: number
} }
interface State { interface State {