react-instantsearch-nextjs 0.1.0 → 0.1.2

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
@@ -1,7 +1,6 @@
1
1
  <!-- START doctoc generated TOC please keep comment here to allow auto update -->
2
2
  <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
3
3
 
4
-
5
4
  - [react-instantsearch-nextjs](#react-instantsearch-nextjs)
6
5
  - [Installation](#installation)
7
6
  - [Usage](#usage)
@@ -58,7 +57,7 @@ export function Search() {
58
57
  }
59
58
  ```
60
59
 
61
- Import the `<InstantSearchNext>` component from the `react-instantsearch-nextjs` package, and replace the <%= widget_link('instantsearch', 'react') %> component with it, without changing the props.
60
+ Import the `<InstantSearchNext>` component from the `react-instantsearch-nextjs` package, and replace the [`<InstantSearch>`](https://www.algolia.com/doc/api-reference/widgets/instantsearch/react/) component with it, without changing the props.
62
61
 
63
62
 
64
63
  ```diff
@@ -75,10 +74,12 @@ const searchClient = algoliasearch('YourApplicationID', 'YourSearchOnlyAPIKey');
75
74
  export function Search() {
76
75
  return (
77
76
  - <InstantSearch indexName="YourIndexName" searchClient={searchClient}>
78
- + <InstantSearchSSRNext indexName="YourIndexName" searchClient={searchClient}>
77
+ + <InstantSearchNext indexName="YourIndexName" searchClient={searchClient}>
79
78
  <SearchBox />
80
79
  {/* other widgets */}
81
- </InstantSearch>
80
+
81
+ - </InstantSearch>
82
+ + </InstantSearchNext>
82
83
  );
83
84
  }
84
85
  ```
@@ -62,7 +62,9 @@ function InstantSearchNext(_ref) {
62
62
  if (this.isDisposed) {
63
63
  return;
64
64
  }
65
- router.push(url);
65
+ router.push(url, {
66
+ scroll: false
67
+ });
66
68
  };
67
69
  if (_typeof(passedRouting) === 'object') {
68
70
  browserHistoryOptions = _objectSpread(_objectSpread({}, browserHistoryOptions), passedRouting.router);
@@ -53,7 +53,9 @@ export function InstantSearchNext(_ref) {
53
53
  if (this.isDisposed) {
54
54
  return;
55
55
  }
56
- router.push(url);
56
+ router.push(url, {
57
+ scroll: false
58
+ });
57
59
  };
58
60
  if (_typeof(passedRouting) === 'object') {
59
61
  browserHistoryOptions = _objectSpread(_objectSpread({}, browserHistoryOptions), passedRouting.router);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-instantsearch-nextjs",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "React InstantSearch SSR utilities for Next.js",
5
5
  "source": "src/index.ts",
6
6
  "types": "dist/es/index.d.ts",
@@ -48,13 +48,13 @@
48
48
  "test:exports": "node ./__tests__/module/is-es-module.mjs && node ./__tests__/module/is-cjs-module.cjs"
49
49
  },
50
50
  "devDependencies": {
51
- "instantsearch.js": "4.57.0",
51
+ "instantsearch.js": "4.58.0",
52
52
  "next": "13.5.1",
53
- "react-instantsearch-core": "7.1.0"
53
+ "react-instantsearch-core": "7.2.0"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "next": ">= 13.4 && < 14",
57
57
  "react-instantsearch": ">= 7.1.0 && < 8"
58
58
  },
59
- "gitHead": "b2196f01f03c6bea37a3aa048e4e5b45a9bbf33d"
59
+ "gitHead": "d21e0ed006139e5635df70d7a4caf0c99ab85f5a"
60
60
  }