Commit 85838a40 by Hugo Häggmark

fix: Dispatch the correct action (#14985)

parent 75e3d900
...@@ -5,7 +5,7 @@ import { connect } from 'react-redux'; ...@@ -5,7 +5,7 @@ import { connect } from 'react-redux';
import { ExploreId, ExploreItemState } from 'app/types/explore'; import { ExploreId, ExploreItemState } from 'app/types/explore';
import { StoreState } from 'app/types'; import { StoreState } from 'app/types';
import { toggleGraph } from './state/actions'; import { toggleTable } from './state/actions';
import Table from './Table'; import Table from './Table';
import Panel from './Panel'; import Panel from './Panel';
import TableModel from 'app/core/table_model'; import TableModel from 'app/core/table_model';
...@@ -16,12 +16,12 @@ interface TableContainerProps { ...@@ -16,12 +16,12 @@ interface TableContainerProps {
onClickCell: (key: string, value: string) => void; onClickCell: (key: string, value: string) => void;
showingTable: boolean; showingTable: boolean;
tableResult?: TableModel; tableResult?: TableModel;
toggleGraph: typeof toggleGraph; toggleTable: typeof toggleTable;
} }
export class TableContainer extends PureComponent<TableContainerProps> { export class TableContainer extends PureComponent<TableContainerProps> {
onClickTableButton = () => { onClickTableButton = () => {
this.props.toggleGraph(this.props.exploreId); this.props.toggleTable(this.props.exploreId);
}; };
render() { render() {
...@@ -43,7 +43,7 @@ function mapStateToProps(state: StoreState, { exploreId }) { ...@@ -43,7 +43,7 @@ function mapStateToProps(state: StoreState, { exploreId }) {
} }
const mapDispatchToProps = { const mapDispatchToProps = {
toggleGraph, toggleTable,
}; };
export default hot(module)(connect(mapStateToProps, mapDispatchToProps)(TableContainer)); export default hot(module)(connect(mapStateToProps, mapDispatchToProps)(TableContainer));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment