From 198c17a19fabe4a026e76cce269900945aa6dde4 Mon Sep 17 00:00:00 2001 From: Laurent Bossavit Date: Sun, 1 Oct 2017 16:24:55 +0200 Subject: [PATCH] =?UTF-8?q?:gear:=20Affiche=20la=20commune=20concern=C3=A9?= =?UTF-8?q?e=20dans=20le=20tableau=20des=20taux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/engine/mecanisms.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/engine/mecanisms.js b/source/engine/mecanisms.js index add880c3a..61ab0a1eb 100644 --- a/source/engine/mecanisms.js +++ b/source/engine/mecanisms.js @@ -641,6 +641,9 @@ export let mecanismSelection = (recurse,k,v) => { return rewriteNode(node,nodeValue,explanation,collectMissing) } + let indexOf = explanation => explanation.nodeValue ? R.findIndex(x => x['nomLaposte'] == explanation.nodeValue, R.values(taux_versement_transport)) : 0 + let indexOffset = 8 + let jsx = (nodeValue, explanation) => { headerHeight={20} rowHeight={30} rowCount={R.values(taux_versement_transport).length} + scrollToIndex={indexOf(explanation)+indexOffset} + rowStyle={ + ({ index }) => index == indexOf(explanation) ? { fontWeight: "bold" } : {} + } rowGetter={ ({ index }) => { // transformation de données un peu crade du fichier taux.json qui gagnerait à être un CSV