feat(netlify-cms-widget-relation): use react-select and add support for multiple entries (#1936)

This commit is contained in:
Alexander Nanberg
2019-02-19 20:11:38 +01:00
committed by Shawn Erquhart
parent 944290ea1d
commit 518f6fb1c0
9 changed files with 431 additions and 236 deletions

View File

@ -396,7 +396,6 @@ class Backend {
const entries = await this.listAllEntries(collection);
const hits = fuzzy
.filter(searchTerm, entries, { extract: extractSearchFields(searchFields) })
.filter(entry => entry.score > 5)
.sort(sortByScore)
.map(f => f.original);
return { query: searchTerm, hits };

View File

@ -66,8 +66,7 @@ export default class Widget extends Component {
return (
this.props.value !== nextProps.value ||
this.props.classNameWrapper !== nextProps.classNameWrapper ||
this.props.hasActiveStyle !== nextProps.hasActiveStyle ||
this.props.queryHits !== nextProps.queryHits
this.props.hasActiveStyle !== nextProps.hasActiveStyle
);
}