-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Refactor SearchResultProvider state management This fixes a "flicker" of invalid product images being shown each time a filter was changed. A local variable was mutated to work around chaining `updateStore` calls carrying on the old store value. The reference of the `store` value in the action functions would carry the values of the initial store. Thus each time a color filter was changed for example then during the reloading phase the images for the initial products were shown. Use the functional component equivalent of a `setState` callback, which is an effect triggering on the relevant store change. Instead of functions chaining `updateStore` and calling `refresh()` trigger the refresh in an effect when the store has been updated to `reloading`. Also remove `appliedFilters`. The combination of `filters` and `reloading` provides the same functionality. * Update the total number of items when filtering * Bump version * Fix ForwardThumbnail throwing without img selector in children The main use case for this would be lazy loaded images.
- Loading branch information
tonylepmets
authored
Mar 20, 2020
1 parent
cbfbd73
commit 6be4649
Showing
7 changed files
with
82 additions
and
88 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters