mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 01:18:23 +00:00
Fix state not changing in chart (#7900)
* Fix in chart, toggles are not working * Update Chart.jsx --------- Co-authored-by: Arpit <arpitnath42@gmail.com>
This commit is contained in:
parent
74c470c6c5
commit
40323decef
1 changed files with 5 additions and 6 deletions
|
|
@ -56,17 +56,16 @@ class Chart extends React.Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
const { dataQueries, component, paramUpdated, componentMeta, components, currentState } = this.state;
|
||||
const data = this.state.component.component.definition.properties.data;
|
||||
const { dataQueries, component, paramUpdated, componentMeta, components, currentState } = this.props;
|
||||
const data = this.props.component.component.definition.properties.data; // since component is not unmounting on every render in current scenario
|
||||
|
||||
const jsonDescription = this.state.component.component.definition.properties.jsonDescription;
|
||||
const jsonDescription = this.props.component.component.definition.properties.jsonDescription;
|
||||
|
||||
const plotFromJson = resolveReferences(
|
||||
this.state.component.component.definition.properties.plotFromJson?.value,
|
||||
this.props.component.component.definition.properties.plotFromJson?.value,
|
||||
currentState
|
||||
);
|
||||
|
||||
const chartType = this.state.component.component.definition.properties.type.value;
|
||||
const chartType = this.props.component.component.definition.properties.type.value;
|
||||
|
||||
let items = [];
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue