Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

fix(connectNumericMenu): support numeric refinement 0 #2882

Merged
merged 3 commits into from
Dec 17, 2019

Conversation

tkrugg
Copy link
Contributor

@tkrugg tkrugg commented Dec 11, 2019

Summary

This PR adds in connectNumericMenu support for numericRefinement 0.
There has been complaints about the following not producing a refinement

import { NumericMenu } from 'react-instantsearch-dom';

<NumericMenu
  attribute="price"
  items={[
    { label: '<= 0', start: 0 },
    /* ... */
  ]}
/>

Result

fixes #867

@tkrugg tkrugg requested a review from a team December 11, 2019 16:36
@ghost ghost requested review from eunjae-lee and yannickcr and removed request for a team December 11, 2019 16:36
@tkrugg tkrugg requested a review from Haroenv December 11, 2019 16:38
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.

fix lgtm, suggestion on test

@francoischalifour
Copy link
Member

Could you add a story with an appropriate Algolia index?

@tkrugg tkrugg merged commit 30bd9fd into master Dec 17, 2019
@tkrugg tkrugg deleted the fixes/connect-numeric-menu-refinement-0 branch December 17, 2019 09:26
Haroenv added a commit that referenced this pull request Dec 17, 2019
# [6.1.0](v6.0.0...v6.1.0) (2019-12-17)

### Bug Fixes

* **connectNumericMenu:** support numeric refinement 0 ([#2882](#2882)) ([30bd9fd](30bd9fd))
* **deps:** update dependency next to v9.1.1 ([9d49d33](9d49d33))
* **helper:** rely on stable version of algoliasearch-helper ([#2871](#2871)) ([e3531a1](e3531a1))

### Features

* **insights:** show an error when 'clickAnalytics: true' is missing. ([#2877](#2877)) ([621656a](621656a))
* **voice:** add additionalQueryParameters ([#2366](#2366)) ([3a45b2c](3a45b2c))
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NumericMenu items ignore the value "0" in their bounds
4 participants