react-algoliasearch
react-algoliasearch copied to clipboard
Unable to override templates
It looks like this package uses deep-assign
under the hood, which does not merge in function values:
var deepAssign = require("deep-assign")
deepAssign({ templates: { suggestion: true } }, { templates: { suggestion: () => {} } })
via https://npm.runkit.com/deep-assign
This makes it impossible to change the suggestion template which is used to control the display text of suggestions during autocomplete:
let options = {
templates: {
suggestion: entry => entry.name
}
}
<AgAutocomplete options={options} />
Additionally, deep-assign has been deprecated, and the author recommends using something like merge-options
.
thanks @nhunzaker this weekend i'll take care to update this stuff and publish to npm with the other fixes
Thanks! I ended up temporarily vendoring your package. This is the deep assign package I pulled in: https://github.com/KyleAMathews/deepmerge