Skip to content

Commit

Permalink
fix(dev): don't show a warning for connectRange (#4440)
Browse files Browse the repository at this point in the history
* fix(dev): don't show a warning for connectRange

https://github.com/algolia/instantsearch.js/blob/master/src/widgets/range-input/range-input.js#L170 e.g. edits the $$type (see #4227), but that means that the base type was no longer accepted, which is fixed here

fixes #4437 cc @yonguelink

* prevent range from showing up twice
  • Loading branch information
Haroenv authored Jun 23, 2020
1 parent ada37ae commit eb8c8b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/utils/checkIndexUiState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Widget, IndexUiState } from '../../types';
function getWidgetNames(connectorName: string): string[] {
switch (connectorName) {
case 'range':
return ['rangeInput', 'rangeSlider'];
return [];

case 'menu':
return ['menu', 'menuSelect'];
Expand Down Expand Up @@ -56,7 +56,7 @@ const stateToWidgetsMap: StateToWidgets = {
},
range: {
connectors: ['connectRange'],
widgets: ['ais.rangeInput', 'ais.rangeSlider'],
widgets: ['ais.rangeInput', 'ais.rangeSlider', 'ais.range'],
},
toggle: {
connectors: ['connectToggleRefinement'],
Expand Down

0 comments on commit eb8c8b3

Please sign in to comment.