diff --git a/README.md b/README.md index 121eb32f..45835d40 100644 --- a/README.md +++ b/README.md @@ -184,6 +184,11 @@ search.autocomplete.on('autocomplete:opened', function(e) { }); ``` +### Docsearch Options + + +#### handleSelected + We already bind the autocomplete:selected event inside the docsearch. If you want to replace the default behavior you can pass the `handleSelected` option. @@ -197,6 +202,21 @@ var search = docsearch({ }); ``` +#### transformData + +If you want to modify the hits before displaying them you can make use of the +`transformData` option + +var search = docsearch({ + apiKey: '', + indexName: '', + inputSelector: '', + transformData: function (hits) { + // modify hits + return hits; + } +}); + ### Algolia options You can also pass any specific option to the Algolia API to change the way