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

Commit 3717de6

Browse files
committed
fix(dynamicWidgets): allow only dynamicWidgets as attribute
According to: https://handlebarsjs.com/guide/builtin-helpers.html#if, an empty array will not render the block at all. If there's no attributesForFaceting, but there's dynamicWidgets, the sidebar should still render. Since this change the sidebar is always rendered, but that's no big deal as the css is always there too
1 parent a7450f6 commit 3717de6

File tree

3 files changed

+0
-6
lines changed

3 files changed

+0
-6
lines changed

src/templates/InstantSearch.js/index.html.hbs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131

3232
<div class="container">
3333
<div class="search-panel">
34-
{{#if attributesForFaceting}}
3534
<div class="search-panel__filters">
3635
{{#if flags.dynamicWidgets}}
3736
<div id="dynamic-widgets"></div>
@@ -42,7 +41,6 @@
4241
{{/if}}
4342
</div>
4443

45-
{{/if}}
4644
<div class="search-panel__results">
4745
<div id="searchbox"></div>
4846
<div id="hits"></div>

src/templates/React InstantSearch/src/App.js.hbs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ function App() {
3939
<div className="container">
4040
<InstantSearch searchClient={searchClient} indexName="{{indexName}}">
4141
<div className="search-panel">
42-
{{#if attributesForFaceting}}
4342
<div className="search-panel__filters">
4443
{{#if flags.dynamicWidgets}}
4544
<Configure facets={['*']} maxValuesPerFacet={20} />
@@ -55,7 +54,6 @@ function App() {
5554
{{/if}}
5655
</div>
5756

58-
{{/if}}
5957
<div className="search-panel__results">
6058
<SearchBox
6159
className="searchbox"

src/templates/Vue InstantSearch/src/App.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
<div class="container">
1818
<ais-instant-search :search-client="searchClient" index-name="{{indexName}}">
1919
<div class="search-panel">
20-
{{#if attributesForFaceting.length}}
2120
<div class="search-panel__filters">
2221
{{#if flags.dynamicWidgets}}
2322
<ais-configure :facets="['*']" :max-values-per-facet.camel="20" />
@@ -33,7 +32,6 @@
3332
{{/if}}
3433
</div>
3534

36-
{{/if}}
3735
<div class="search-panel__results">
3836
<div class="searchbox">
3937
<ais-search-box placeholder="{{searchPlaceholder}}" />

0 commit comments

Comments
 (0)