Skip to content
Snippets Groups Projects
Commit daa68987 authored by Maxime Jacquemin's avatar Maxime Jacquemin Committed by David Bühler
Browse files

[ivette] Using the ModelProp interface everywhere

It is a minor detail
parent 02785d43
No related branches found
No related tags found
No related merge requests found
...@@ -33,7 +33,7 @@ import { Hpack, Filler } from 'dome/layout/boxes'; ...@@ -33,7 +33,7 @@ import { Hpack, Filler } from 'dome/layout/boxes';
import { Icon } from 'dome/controls/icons'; import { Icon } from 'dome/controls/icons';
import { Cell } from 'dome/controls/labels'; import { Cell } from 'dome/controls/labels';
import { IconButton } from 'dome/controls/buttons'; import { IconButton } from 'dome/controls/buttons';
import { ModelProp, Model } from 'frama-c/plugins/eva/model'; import { ModelProp } from 'frama-c/plugins/eva/model';
// Frama-C // Frama-C
import * as States from 'frama-c/states'; import * as States from 'frama-c/states';
...@@ -275,11 +275,11 @@ function TableHead(props: TableHeadProps) { ...@@ -275,11 +275,11 @@ function TableHead(props: TableHeadProps) {
interface TableRowProps { interface TableRowProps {
style: React.CSSProperties; style: React.CSSProperties;
index: number; index: number;
data: Model; data: ModelProp;
} }
function TableRow(props: TableRowProps) { function TableRow(props: TableRowProps) {
const model = props.data; const { model } = props.data;
const row = model.getRow(props.index); const row = model.getRow(props.index);
if (!row) return null; if (!row) return null;
const { kind, probes } = row; const { kind, probes } = row;
...@@ -347,9 +347,8 @@ export interface Dimension { ...@@ -347,9 +347,8 @@ export interface Dimension {
height: number; height: number;
} }
export interface ValuesPanelProps extends Dimension { export interface ValuesPanelProps extends Dimension, ModelProp {
zoom: number; zoom: number;
model: Model;
} }
export function ValuesPanel(props: ValuesPanelProps) { export function ValuesPanel(props: ValuesPanelProps) {
...@@ -385,7 +384,7 @@ export function ValuesPanel(props: ValuesPanelProps) { ...@@ -385,7 +384,7 @@ export function ValuesPanel(props: ValuesPanelProps) {
estimatedItemSize={estimatedHeight} estimatedItemSize={estimatedHeight}
width={width} width={width}
height={height} height={height}
itemData={model} itemData={{ model }}
> >
{TableRow} {TableRow}
</VariableSizeList> </VariableSizeList>
......
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