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(Hits): limit the hitComponent to be only a function #1912

Merged
merged 1 commit into from
Jan 27, 2017
Merged

Conversation

mikaa123
Copy link

What project are you opening a pull request for?

  • react-instantsearch (use v2 base)

Summary
This merge request limits the hitComponent prop of <Hits> to be only a function. It keeps the API simple, and will now print a warning if the user pass a string.

Result
Passing a string to hitComponent now makes React complain about it.

Copy link
Contributor

@bobylito bobylito left a comment

Choose a reason for hiding this comment

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

I saw the discussion this morning. Good point :)

@bobylito
Copy link
Contributor

@mikaa123 There are some failing tests, can you have a look?

@bobylito bobylito merged commit b3c9578 into v2 Jan 27, 2017
@bobylito bobylito deleted the fix-hits-props branch January 27, 2017 08:54
vvo pushed a commit that referenced this pull request Feb 6, 2017
<a name="3.0.0"></a>
# [3.0.0](v2.2.5...v3.0.0) (2017-02-06)

### Bug Fixes

* ***List:** disable shortcuts in *List SearchBoxes (#1921) ([51a76ae](51a76ae)), closes [#1920](#1920)
* **Configure:** add configure parameters in search state (#1935) ([0971330](0971330)), closes [#1863](#1863)
* **Hits:** limit the hitComponent to be only a function (#1912) ([b3c9578](b3c9578))
* **Pagination:** fix and indicate when pagination is disabled ([5f20199](5f20199)), closes [#1938](#1938)
* **StarRating:** usage with filters (#1933) ([667e9d5](667e9d5))
* **withSearchBox:** keep displaying searchBox when no items found (#1930) ([30de4cd](30de4cd))

### Features

* **MultiRange:** indicate if a range has no refinements (#1926) ([80b6450](80b6450))
* **panel:** add a panel widget (#1889) ([594e1a1](594e1a1))
* **starRating:** indicate when any refinement has no effect ([c547ae5](c547ae5))
* **widgets:** default design for disabled states (#1929) ([31f010b](31f010b))
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.

3 participants