Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Hit not re-rendered when you modify the data in transformData #1538

Closed
kokliKo opened this issue Nov 10, 2016 · 1 comment · Fixed by #1555
Closed

Bug: Hit not re-rendered when you modify the data in transformData #1538

kokliKo opened this issue Nov 10, 2016 · 1 comment · Fixed by #1555
Assignees

Comments

@kokliKo
Copy link
Contributor

kokliKo commented Nov 10, 2016

When making two queries that return the same hit, but this hit is handled differently in transformData between the first and second query, the hit component won't be re-rendered.

Apparently, that comes from the fact that shouldComponentUpdate is based on the data retrieved by the API instead of the data sent after transformData.

An easy way to reproduce this is to add a timestamp to the hit object in transformData, and display it in the component.

@vvo
Copy link
Contributor

vvo commented Nov 10, 2016

We have found a solution for that: we would need to actually call transformData BEFORE it's passed to the Template component: makes sense, you want to do a shouldComponentUpdate on data that is fully computed.

@vvo vvo self-assigned this Nov 15, 2016
vvo pushed a commit that referenced this issue Nov 15, 2016
Event when data does not changes, we now call transformData, so that
if the transformedData changes, there will be a new render.

fixes #1538
@vvo vvo closed this as completed in #1555 Nov 16, 2016
vvo added a commit that referenced this issue Nov 16, 2016
Event when data does not changes, we now call transformData, so that
if the transformedData changes, there will be a new render.

fixes #1538
vvo pushed a commit that referenced this issue Nov 16, 2016
<a name="1.8.15"></a>
## [1.8.15](v1.8.14...v1.8.15) (2016-11-16)

### Bug Fixes

* **priceRanges:** avoid displaying solo ranges (#1544) ([ff396f0](ff396f0)), closes [#1536](#1536)
* **priceRanges:** use formatNumber in defaultTemplate (#1559) ([557a501](557a501)), closes [#1230](#1230)
* **toggle:** support negative numeric values for on/off (#1551) ([e4d88e0](e4d88e0)), closes [#1537](#1537)
* **transformData:** always call transformData (#1555) ([49bfeca](49bfeca)), closes [#1538](#1538)
vvo added a commit that referenced this issue Nov 16, 2016
Event when data does not changes, we now call transformData, so that
if the transformedData changes, there will be a new render.

fixes #1538
bobylito pushed a commit that referenced this issue Nov 17, 2016
* fix(transformData): always call transformData (#1555)

Event when data does not changes, we now call transformData, so that
if the transformedData changes, there will be a new render.

fixes #1538

* fix(transformData): default data is an object when not provided

This fixes the nasty regression bug we have seen and reimplement the
transformData fix
vvo pushed a commit that referenced this issue Dec 14, 2016
<a name="1.9.0"></a>
# [1.9.0](v1.8.16...v1.9.0) (2016-12-14)

### Bug Fixes

* **currentRefinedValues:** unescape disjunctive facet refinement names (#1574) ([9ab65c4](9ab65c4)), closes [#1569](#1569)
* **transformData:** default data is an object when not provided (#1570) ([8eeeeba](8eeeeba)), closes [#1538](#1538)

### Features

* **analytics:** new analytics widget to easily plug search to any analytics service ([09d8fda](09d8fda))
* **retry strategy:** new retry strategy ([afdcc3c](afdcc3c))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants