instantsearch.js 4.40.6 → 4.41.0
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/CHANGELOG.md +9 -0
- package/cjs/lib/InstantSearch.js +11 -3
- package/cjs/lib/version.js +1 -1
- package/dist/instantsearch.development.js +13 -5
- package/dist/instantsearch.development.js.map +1 -1
- package/dist/instantsearch.production.min.js +2 -2
- package/dist/instantsearch.production.min.js.map +1 -1
- package/es/lib/InstantSearch.js +11 -3
- package/es/lib/version.d.ts +1 -1
- package/es/lib/version.js +1 -1
- package/package.json +1 -1
package/es/lib/InstantSearch.js
CHANGED
|
@@ -460,9 +460,17 @@ var InstantSearch = /*#__PURE__*/function (_EventEmitter) {
|
|
|
460
460
|
defer(function () {
|
|
461
461
|
_this3.scheduleSearch = originalScheduleSearch;
|
|
462
462
|
})();
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
|
|
463
|
+
} // We only schedule a search when widgets have been added before `start()`
|
|
464
|
+
// because there are listeners that can use these results.
|
|
465
|
+
// This is especially useful in framework-based flavors that wait for
|
|
466
|
+
// dynamically-added widgets to trigger a network request. It avoids
|
|
467
|
+
// having to batch this initial network request with the one coming from
|
|
468
|
+
// `addWidgets()`.
|
|
469
|
+
// Later, we could also skip `index()` widgets and widgets that don't read
|
|
470
|
+
// the results, but this is an optimization that has a very low impact for now.
|
|
471
|
+
else if (this.mainIndex.getWidgets().length > 0) {
|
|
472
|
+
this.scheduleSearch();
|
|
473
|
+
} // Keep the previous reference for legacy purpose, some pattern use
|
|
466
474
|
// the direct Helper access `search.helper` (e.g multi-index).
|
|
467
475
|
|
|
468
476
|
|
package/es/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "4.
|
|
1
|
+
declare const _default: "4.41.0";
|
|
2
2
|
export default _default;
|
package/es/lib/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '4.
|
|
1
|
+
export default '4.41.0';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "instantsearch.js",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.41.0",
|
|
4
4
|
"description": "InstantSearch.js is a JavaScript library for building performant and instant search experiences with Algolia.",
|
|
5
5
|
"homepage": "https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/",
|
|
6
6
|
"types": "es/index.d.ts",
|