@askdialog/dialog-sdk 2.18.0 → 2.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -332,7 +332,7 @@ const controller = createSearchController({
|
|
|
332
332
|
},
|
|
333
333
|
navigate: (url) => router.push(url), // optional platform routing adapter
|
|
334
334
|
buildProductUrl: (hit) => `/products/${hit.handle}`, // optional, for hits without `url`
|
|
335
|
-
debounceMs:
|
|
335
|
+
debounceMs: 100, // optional (default 100)
|
|
336
336
|
hitsPerPage: 12, // optional (default 12)
|
|
337
337
|
sections: [{ index: 'collections', hitsPerPage: 5 }], // optional, first page only; a function is resolved per request
|
|
338
338
|
});
|
package/dist/searchController.js
CHANGED
|
@@ -2,7 +2,7 @@ import { searchIndexName } from "./services/search";
|
|
|
2
2
|
import { SearchStatus, } from "./types/searchController";
|
|
3
3
|
import { createControllerAnalytics } from "./utils/searchControllerAnalytics";
|
|
4
4
|
import { buildSearchRequest, INITIAL_SEARCH_STATE, normalizeQuery, readSearchResults, } from "./utils/searchRequests";
|
|
5
|
-
export function createSearchController({ search, language, country, analytics, navigate, buildProductUrl, debounceMs =
|
|
5
|
+
export function createSearchController({ search, language, country, analytics, navigate, buildProductUrl, debounceMs = 100, hitsPerPage = 12, sections = [], }) {
|
|
6
6
|
const requestConfig = {
|
|
7
7
|
indexName: searchIndexName("products", language, country),
|
|
8
8
|
language,
|