algolia / instantsearch

⚡️ Libraries for building performant and instant search and recommend experiences with Algolia. Compatible with JavaScript, TypeScript, React and Vue.
https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/
MIT License
3.66k stars 514 forks source link

Error: noUiSlider: must pass a formatter for all handles. #898

Closed oddnavy closed 8 years ago

oddnavy commented 8 years ago

I'm receiving the following error when I use the range slider format method. The code pretty much follows the demo.

search.instantsearch.addWidget(
    instantsearch.widgets.rangeSlider({
        container: '#journeys-price-widget',
        attributeName: 'price',
        templates: {
            header: 'Price'
        },
        autoHideContainer: false,
        tooltips: {
            format: function(formattedValue) {
                return '$' + formattedValue;
            }
        }
    })
);

This triggers the following errors.

Warning: Failed propType: Invalid prop `tooltips` supplied to `Nouislider`. Check the render method of `Slider`.warning @ bundle.js:47533checkPropTypes @ bundle.js:91698validatePropTypes @ bundle.js:91717ReactElementValidator.createElement @ bundle.js:91751render @ bundle.js:49800ReactCompositeComponentMixin._renderValidatedComponentWithoutOwnerOrContext @ bundle.js:88178ReactCompositeComponentMixin._renderValidatedComponent @ bundle.js:88198wrapper @ bundle.js:94628ReactCompositeComponentMixin.mountComponent @ bundle.js:87811wrapper @ bundle.js:94628ReactReconciler.mountComponent @ bundle.js:95256ReactMultiChild.Mixin.mountChildren @ bundle.js:93959ReactDOMComponent.Mixin._createContentMarkup @ bundle.js:89056ReactDOMComponent.Mixin.mountComponent @ bundle.js:88944ReactReconciler.mountComponent @ bundle.js:95256ReactMultiChild.Mixin.mountChildren @ bundle.js:93959ReactDOMComponent.Mixin._createContentMarkup @ bundle.js:89056ReactDOMComponent.Mixin.mountComponent @ bundle.js:88944ReactReconciler.mountComponent @ bundle.js:95256ReactCompositeComponentMixin.mountComponent @ bundle.js:87816wrapper @ bundle.js:94628ReactReconciler.mountComponent @ bundle.js:95256ReactCompositeComponentMixin.mountComponent @ bundle.js:87816wrapper @ bundle.js:94628ReactReconciler.mountComponent @ bundle.js:95256mountComponentIntoNode @ bundle.js:93131Mixin.perform @ bundle.js:97922batchedMountComponentIntoNode @ bundle.js:93147Mixin.perform @ bundle.js:97922ReactDefaultBatchingStrategy.batchedUpdates @ bundle.js:90712batchedUpdates @ bundle.js:95989ReactMount._renderNewRootComponent @ bundle.js:93341wrapper @ bundle.js:94628ReactMount._renderSubtreeIntoContainer @ bundle.js:93415ReactMount.render @ bundle.js:93435wrapper @ bundle.js:94628render @ bundle.js:53202(anonymous function) @ bundle.js:50435(anonymous function) @ bundle.js:18460(anonymous function) @ bundle.js:18744(anonymous function) @ bundle.js:18963_render @ bundle.js:50431EventEmitter.emit @ bundle.js:46057AlgoliaSearchHelper._handleResponse @ bundle.js:25456wrapper @ bundle.js:19194(anonymous function) @ bundle.js:27455
bundle.js:80556 Uncaught Error: noUiSlider: must pass a formatter for all handles.

If I remove the format method the error does not occur.

vvo commented 8 years ago

Are you using the jsdelivr build or an npm one?

oddnavy commented 8 years ago

Using browserify / npm

David

On 4 Mar 2016, at 20:30, Vincent Voyer notifications@github.com wrote:

Are you using the jsdelivr build or an npm one?

— Reply to this email directly or view it on GitHub.

vvo commented 8 years ago

Ok so this is fixed in our develop branch that will be released soon.

You are experiencing this because of an update to one of the modules used by instantsearch.js (react-nouislider/nouislider) where this broke (tooltips).

I should be able to release it today (1.3)

vvo commented 8 years ago

1.3 was released, you can upgrade