@@ -8,11 +8,8 @@ const usage = `Usage:
88var customToggle = connectToggle(function render(params, isFirstRendering) {
99 // params = {
1010 // value,
11- // state,
1211 // createURL,
1312 // refine,
14- // helper,
15- // isFirstSearch,
1613 // instantSearchInstance,
1714 // }
1815});
@@ -35,13 +32,10 @@ Full documentation available at https://community.algolia.com/instantsearch.js/c
3532
3633/**
3734 * @typedef {Object } ToggleRenderingOptions
38- * @property {Object } value
39- * @property {Object } state
40- * @property {function } createURL
41- * @property {function } refine
42- * @property {Object } helper
43- * @property {boolean } isFirstSearch
44- * @property {InstantSearch } instantSearchInstance
35+ * @property {Object } value the value of the toggle with `name`, `isRefined`, `count`, `onFacetValue` and `offFacetValue`
36+ * @property {function } createURL the function to create a url for the next state
37+ * @property {function } refine updates to the next state
38+ * @property {InstantSearch } instantSearchInstance the instance of instantsearch on which the widget is attached
4539 */
4640
4741/**
@@ -131,11 +125,8 @@ export default function connectToggle(renderFn) {
131125
132126 renderFn ( {
133127 value,
134- state : helper . state ,
135128 createURL : this . _createURL ,
136129 refine : this . toggleRefinement ,
137- helper,
138- isFirstSearch : true ,
139130 instantSearchInstance,
140131 } , true ) ;
141132 } ,
@@ -180,7 +171,6 @@ export default function connectToggle(renderFn) {
180171 createURL : this . _createURL ,
181172 refine : this . toggleRefinement ,
182173 helper,
183- isFirstSearch : false ,
184174 instantSearchInstance,
185175 } , false ) ;
186176 } ,
0 commit comments