Closed semanticfire closed 3 years ago
Hi @semanticfire , you can use the forkAutocompleter
functionality here. Make sure to run this before instantiating yasqe
//Disable property completer
Yasqe.defaults.autocompleters.splice(Yasqe.defaults.autocompleters.indexOf("property"), 1);
//Add a new one, based on the property completer we just disabled
Yasqe.forkAutocompleter("property", {
name: "customPropertyCompleter",
get: (yasqe, token) => {
if (!token) return [];
return Promise.all([
Yasqe.Autocompleters.property.get(yasqe, token),//fetch using regular lov autocompleter
Promise.resolve([token.autocompletionString + 'someOtherSuggestion'])
]).then(results => {
return [...results[0], ...results[1]]
})
}
});
Is it possible to use multiple autocompleters and combine the results, I want to use the standard LOV and then extend that with some of our internal vocabulaires.