From 2fa6a8d59cb7918ff739a9b20ba72c46694a46f1 Mon Sep 17 00:00:00 2001 From: mama Date: Fri, 13 Oct 2017 12:40:25 +0200 Subject: [PATCH] =?UTF-8?q?Les=20sommes=20imbriqu=C3=A9es=20se=20r=C3=A9v?= =?UTF-8?q?=C3=A8lent=20au=20clic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/engine/mecanismViews/Somme.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/engine/mecanismViews/Somme.js b/source/engine/mecanismViews/Somme.js index 3066e1da0..f4260e784 100644 --- a/source/engine/mecanismViews/Somme.js +++ b/source/engine/mecanismViews/Somme.js @@ -20,21 +20,25 @@ let Table = ({explanation}) =>
+/* La colonne peut au clic afficher une nouvelle colonne qui sera une autre somme imbriquée */ class Row extends Component { + state = { + folded: true + } render() { let {v, i} = this.props, rowFormula = path(["explanation", "formule", "explanation"], v), isSomme = rowFormula && rowFormula.name == "somme" return [ - + this.setState({folded: false})}> {i != 0 && "+"} {makeJsx(v)} , - ...(isSomme + ...(isSomme && !this.state.folded ? [