From 6de70c3e7fe8a0c3f632769c48f59c5d2f8f160b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20=C3=96hlin?= Date: Mon, 27 Nov 2017 10:19:22 +0100 Subject: [PATCH] fix(autocompleteOptions): allow cssClasses options (#246) --- src/lib/DocSearch.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/DocSearch.js b/src/lib/DocSearch.js index 2c75377cc..3b8112acb 100644 --- a/src/lib/DocSearch.js +++ b/src/lib/DocSearch.js @@ -73,9 +73,10 @@ class DocSearch { // eslint-disable-next-line no-param-reassign autocompleteOptions.debug = debug || autocompleteOptionsDebug; this.autocompleteOptions = autocompleteOptions; - this.autocompleteOptions.cssClasses = { - prefix: 'ds', - }; + this.autocompleteOptions.cssClasses = + this.autocompleteOptions.cssClasses || {}; + this.autocompleteOptions.cssClasses.prefix = + this.autocompleteOptions.cssClasses.prefix || 'ds'; // eslint-disable-next-line no-param-reassign handleSelected = handleSelected || this.handleSelected;