File tree Expand file tree Collapse file tree 6 files changed +420
-9
lines changed
Expand file tree Collapse file tree 6 files changed +420
-9
lines changed Original file line number Diff line number Diff line change @@ -317,7 +317,7 @@ search.addWidget(
317317 instantsearch . widgets . toggle ( {
318318 container : '#free-shipping' ,
319319 attributeName : 'free_shipping' ,
320- label : 'Free Shipping' ,
320+ label : 'Free Shipping (toggle single value) ' ,
321321 cssClasses : {
322322 header : 'facet-title' ,
323323 item : 'facet-value checkbox' ,
@@ -330,6 +330,27 @@ search.addWidget(
330330 } )
331331) ;
332332
333+ search . addWidget (
334+ instantsearch . widgets . toggle ( {
335+ container : '#google-amazon' ,
336+ attributeName : 'brand' ,
337+ label : 'Canon (not checked) or sony (checked)' ,
338+ cssClasses : {
339+ header : 'facet-title' ,
340+ item : 'facet-value checkbox' ,
341+ count : 'facet-count pull-right' ,
342+ active : 'facet-active' ,
343+ } ,
344+ values : {
345+ on : 'Sony' ,
346+ off : 'Canon' ,
347+ } ,
348+ templates : {
349+ header : 'Google or amazon (toggle two values)' ,
350+ } ,
351+ } )
352+ ) ;
353+
333354search . addWidget (
334355 instantsearch . widgets . menu ( {
335356 container : '#categories' ,
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ <h1><a href="./">Instant search demo</a> <small>using instantsearch.js</small></
2727 < div class ="facet " id ="brands-2 "> </ div >
2828 < div class ="facet " id ="price-range "> </ div >
2929 < div class ="facet " id ="free-shipping "> </ div >
30+ < div class ="facet " id ="google-amazon "> </ div >
3031 < div class ="facet " id ="price "> </ div >
3132 < div class ="facet " id ="categories "> </ div >
3233 < div class ="facet " id ="price-ranges "> </ div >
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import connectStats from '../connectStats.js';
1111const fakeClient = { addAlgoliaAgent : ( ) => { } } ;
1212
1313describe ( 'connectStats' , ( ) => {
14- it . only ( 'Renders during init and render' , ( ) => {
14+ it ( 'Renders during init and render' , ( ) => {
1515 const container = document . createElement ( 'div' ) ;
1616 // test that the dummyRendering is called with the isFirstRendering
1717 // flag set accordingly
You can’t perform that action at this time.
0 commit comments