🐛 Simplification des données indexées par Fuse

pull/157/head
mama 2018-02-13 19:13:00 +01:00
parent 2aef3d0fad
commit 7f12575b25
1 changed files with 5 additions and 1 deletions

View File

@ -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,