From 7f12575b25c0fa4693c5183e7a148dc2a0c3e9fc Mon Sep 17 00:00:00 2001 From: mama Date: Tue, 13 Feb 2018 19:13:00 +0100 Subject: [PATCH] =?UTF-8?q?:bug:=20Simplification=20des=20donn=C3=A9es=20i?= =?UTF-8?q?ndex=C3=A9es=20par=20Fuse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/components/pages/RulesList.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/components/pages/RulesList.js b/source/components/pages/RulesList.js index 60715191d..8dcbf7e54 100644 --- a/source/components/pages/RulesList.js +++ b/source/components/pages/RulesList.js @@ -9,6 +9,7 @@ import 'react-select/dist/react-select.css' import Fuse from 'fuse.js' import { Redirect } from 'react-router-dom' import Highlighter from 'react-highlight-words' +import { pick } from 'ramda' export default class RulesList extends Component { render() { @@ -42,7 +43,10 @@ export class SearchBar extends React.Component { } ] } - this.fuse = new Fuse(rules, options) + this.fuse = new Fuse( + rules.map(pick(['title', 'espace', 'description', 'name', 'dottedName'])), + options + ) } state = { selectedOption: null,