Skip to content
Snippets Groups Projects
Commit 32820e26 authored by Andre Maroneze's avatar Andre Maroneze
Browse files

Merge branch 'fix/ivette/global-pivot-state' into 'master'

[ivette] Pivot table: uses a global state for the pivot table.

See merge request frama-c/frama-c!3696
parents 2de14b67 0a7f1b77
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,7 @@ import { LED } from 'dome/controls/displays';
import { Scroll } from 'dome/layout/boxes';
import * as Status from 'frama-c/kernel/Status';
import * as States from 'frama-c/states';
import { GlobalState, useGlobalState } from 'dome/data/states';
import * as PivotState from 'frama-c/plugins/pivot/api/general';
import PivotTableUI from 'react-pivottable/PivotTableUI';
import 'frama-c/kernel/PivotTable-style.css';
......@@ -44,8 +45,10 @@ interface PivotTableProps {
data: string[][];
}
const PivotGlobalState = new GlobalState({});
export function Pivot(props: PivotTableProps): JSX.Element {
const [state, setState] = React.useState({});
const [state, setState] = useGlobalState(PivotGlobalState);
return (
<PivotTableUI
data={props.data}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment