Hi,
I'm wondering if you'll be supporting ElasticSearch 7.0.0 eventually?
I gave 7.0.0 a try using ReactiveSearch 2.16.1 and I get the following error:
Objects are not valid as a React child (found: object with keys {value, relation}). If you meant to render a collection of children, use an array instead. in p in div in Styled(div) in div in ReactiveList in Connect(ReactiveList) in ResultCard (at index.jsx:391) in div (at index.jsx:369) in div (at index.jsx:366) in div in Styled(div) in URLParamsProvider in Connect(URLParamsProvider) in Provider in ThemeProvider in ReactiveBase (at index.jsx:363) in div (at index.jsx:362) in Main in t in Container in App
Invariant Violation: Objects are not valid as a React child (found: object with keys {value, relation}). If you meant to render a collection of children, use an array instead.
in p
in div
in Styled(div)
in div
in ReactiveList
in Connect(ReactiveList)
in ResultCard (at index.jsx:391)
in div (at index.jsx:369)
in div (at index.jsx:366)
in div
in Styled(div)
in URLParamsProvider
in Connect(URLParamsProvider)
in Provider
in ThemeProvider
in ReactiveBase (at index.jsx:363)
in div (at index.jsx:362)
in Main
in t
in Container
in App
at invariant (/home/dan/aim-platform/image-archive/reactive-search/node_modules/fbjs/lib/invariant.js:42:15)
at traverseAllChildrenImpl (/home/dan/aim-platform/image-archive/reactive-search/node_modules/react/cjs/react.development.js:805:7)
at traverseAllChildrenImpl (/home/dan/aim-platform/image-archive/reactive-search/node_modules/react/cjs/react.development.js:778:23)
at traverseAllChildren (/home/dan/aim-platform/image-archive/reactive-search/node_modules/react/cjs/react.development.js:833:10)
at mapIntoWithKeyPrefixInternal (/home/dan/aim-platform/image-archive/reactive-search/node_modules/react/cjs/react.development.js:909:3)
at toArray (/home/dan/aim-platform/image-archive/reactive-search/node_modules/react/cjs/react.development.js:956:3)
at ReactDOMServerRenderer.renderDOM (/home/dan/aim-platform/image-archive/reactive-search/node_modules/react-dom/cjs/react-dom-server.node.development.js:2473:18)
at ReactDOMServerRenderer.render (/home/dan/aim-platform/image-archive/reactive-search/node_modules/react-dom/cjs/react-dom-server.node.development.js:2298:21)
at ReactDOMServerRenderer.read (/home/dan/aim-platform/image-archive/reactive-search/node_modules/react-dom/cjs/react-dom-server.node.development.js:2234:19)
at renderToString (/home/dan/aim-platform/image-archive/reactive-search/node_modules/react-dom/cjs/react-dom-server.node.development.js:2501:25)
at renderPage (/home/dan/aim-platform/image-archive/reactive-search/node_modules/next/dist/server/render.js:180:26)
at Function.renderPage [as getInitialProps] (/home/dan/aim-platform/image-archive/reactive-search/.next/dist/bundles/pages/webpack:/pages/_document.js?2bd2:8:18)
at _callee$ (/home/dan/aim-platform/image-archive/reactive-search/node_modules/next/dist/lib/utils.js:36:30)
at tryCatch (/home/dan/aim-platform/image-archive/reactive-search/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:62:40)
at Generator.invoke [as _invoke] (/home/dan/aim-platform/image-archive/reactive-search/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:296:22)
at Generator.prototype.(anonymous function) [as next] (/home/dan/aim-platform/image-archive/reactive-search/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:114:21)
This particular error is now due to total hits no longer returns a number but an object
{
"hits": {
"total": {
"value": 1000,
"relation": "eq"
},
...
}
}
Workaround in your ReactiveList component:
renderResultStats={props =>
<div>{props.numberOfResults.value} results found.</div>
}
@joepio this isn't working for me.
Anything new on this one? Currently i have to delete the total number to make it run. Unfortunately the pagination does not work without the total number
Most helpful comment
Workaround in your
ReactiveListcomponent: