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

fix: pass noop as default value to unmountFn at connectors #3955

Merged
merged 1 commit into from
Jul 15, 2019

Conversation

eunjae-lee
Copy link
Contributor

@eunjae-lee eunjae-lee commented Jul 15, 2019

Summary

Many of the connectors doesn't have default value of unmountFn. When users create custom widget using the connectors and if they don't provide unmountFn, removing the widget will throw an error.
So this PR adds noop as the default value of unmountFn to all the connectors.

Result

All the connectors have noop as default value of unmountFn.

@algobot
Copy link
Contributor

algobot commented Jul 15, 2019

Deploy preview for instantsearchjs ready!

Built with commit 366e21a

https://deploy-preview-3955--instantsearchjs.netlify.com

@eunjae-lee eunjae-lee requested a review from a team July 15, 2019 13:39
Copy link
Contributor

@Haroenv Haroenv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is indeed consistent with the existing ones which have the pattern, and I'll trust you that you didn't forget one

@eunjae-lee
Copy link
Contributor Author

this is indeed consistent with the existing ones which have the pattern, and I'll trust you that you didn't forget one

Yup, I went through all the connectors one by one.

@eunjae-lee eunjae-lee merged commit 7c38744 into develop Jul 15, 2019
@eunjae-lee eunjae-lee deleted the fix/default-value-to-unmount branch July 15, 2019 14:01
Copy link
Contributor

@samouss samouss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The usage should have been covered with a test. We have one for infiniteHits for example.

Haroenv added a commit that referenced this pull request Jul 30, 2019
* **clearRefinements:** reset page to 0 ([#3936](#3936)) ([7378a0a](7378a0a))
* pass noop as default value to unmountFn at connectors ([#3955](#3955)) ([7c38744](7c38744))
* **enhanceConfiguration:** deduplicate the hierarchicalFacets ([#3966](#3966)) ([baf8a35](baf8a35))
* **hierarchicalFacets:** prevent different rootPath on same attribute ([#3965](#3965)) ([5ee79fa](5ee79fa))
* **menuSelect:** unmount component ([#3911](#3911)) ([f6debce](f6debce))
* **rangeInput:** unmount component ([#3910](#3910)) ([f6c29e8](f6c29e8))
* **refinementList:** fix showMore button to work after search ([#3082](#3082)) ([23e46b6](23e46b6))
francoischalifour added a commit that referenced this pull request Oct 8, 2019
# [3.7.0](v3.5.4...v3.7.0) (2019-10-08)

### Bug Fixes

* **clearRefinements:** reset page to 0 ([#3936](#3936)) ([7378a0a](7378a0a))
* **connectSortBy:** never update the initial index ([#4015](#4015)) ([bc0f9e2](bc0f9e2))
* **deps:** update dependency instantsearch.js to v3.5.4 ([#3929](#3929)) ([eff84c5](eff84c5))
* **deps:** update dependency instantsearch.js to v3.6.0 ([#4021](#4021)) ([7719bba](7719bba))
* **enhanceConfiguration:** deduplicate the hierarchicalFacets ([#3966](#3966)) ([baf8a35](baf8a35))
* **examples:** fix IE11 compatibility for e-commerce demo ([#4049](#4049)) ([dc6f350](dc6f350))
* **examples:** fix missing polyfill in e-commerce demo ([#4076](#4076)) ([4bf3ab3](4bf3ab3))
* **hierarchicalFacets:** prevent different rootPath on same attribute ([#3965](#3965)) ([5ee79fa](5ee79fa))
* **instantsearch:** warn deprecated usage of  ([#4151](#4151)) ([18e1c36](18e1c36))
* **menuSelect:** unmount component ([#3911](#3911)) ([f6debce](f6debce))
* **rangeInput:** unmount component ([#3910](#3910)) ([f6c29e8](f6c29e8))
* **refinementList:** fix showMore button to work after search ([#3082](#3082)) ([23e46b6](23e46b6))
* pass noop as default value to unmountFn at connectors ([#3955](#3955)) ([7c38744](7c38744))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants