From bea80a8e8a3e3596d70fe8f1e905a7cd314769e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Fri, 22 Oct 2021 09:48:02 +0200 Subject: [PATCH] [ivette] In the properties table, unfold the status filter by default. --- ivette/src/frama-c/kernel/Properties.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ivette/src/frama-c/kernel/Properties.tsx b/ivette/src/frama-c/kernel/Properties.tsx index 9e7b3ca97db..5163266c43c 100644 --- a/ivette/src/frama-c/kernel/Properties.tsx +++ b/ivette/src/frama-c/kernel/Properties.tsx @@ -369,13 +369,18 @@ const Reload = new Dome.Event('ivette.properties.reload'); interface SectionProps { label: string; + unfold?: boolean; children: React.ReactNode; } function Section(props: SectionProps) { const settings = `properties-section-${props.label}`; return ( - <Folder label={props.label} settings={settings}> + <Folder + label={props.label} + settings={settings} + defaultUnfold={props.unfold} + > {props.children} </Folder> ); @@ -411,7 +416,7 @@ function PropertyFilter() { return ( <Scroll> <CheckField label="Current function" path="currentFunction" /> - <Section label="Status"> + <Section label="Status" unfold> <CheckField label="Valid" path="status.valid" /> <CheckField label="Valid under hyp." path="status.valid_hyp" /> <CheckField label="Unknown" path="status.unknown" /> @@ -623,7 +628,7 @@ export default function RenderProperties() { const [selection, updateSelection] = States.useSelection(); const [showFilter, flipFilter] = - Dome.useFlipSettings('ivette.properties.showFilter'); + Dome.useFlipSettings('ivette.properties.showFilter', true); // Updating the filter Dome.useEvent(Reload, model.reload); -- GitLab