This repository was archived by the owner on Dec 16, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +24
-8
lines changed
src/templates/InstantSearch.js widget/src Expand file tree Collapse file tree 2 files changed +24
-8
lines changed Original file line number Diff line number Diff line change @@ -3661,7 +3661,9 @@ export const connectInstantsearchJsApp: InstantsearchJsAppConnector = function c
36613661
36623662 return {
36633663 ...uiState,
3664- // add this widget's ui state
3664+ instantsearchJsApp: {
3665+ // TODO: add this widget's ui state
3666+ }
36653667 };
36663668 },
36673669
@@ -3683,7 +3685,9 @@ export const connectInstantsearchJsApp: InstantsearchJsAppConnector = function c
36833685 getRenderState(renderState, renderOptions) {
36843686 return {
36853687 ...renderState,
3686- // call this.getWidgetRenderState(renderOptions)
3688+ instantsearchJsApp: {
3689+ // TODO: call this.getWidgetRenderState(renderOptions), possibly nested per attribute
3690+ }
36873691 };
36883692 },
36893693
@@ -3695,11 +3699,15 @@ export const connectInstantsearchJsApp: InstantsearchJsAppConnector = function c
36953699 getWidgetRenderState({ results }) {
36963700 if (!results) {
36973701 // default rendering state without results
3698- return {};
3702+ return {
3703+ widgetParams,
3704+ };
36993705 }
37003706
37013707 // rendering state when there are results
3702- return {};
3708+ return {
3709+ widgetParams,
3710+ };
37033711 },
37043712 };
37053713 };
Original file line number Diff line number Diff line change @@ -71,7 +71,9 @@ export const connect{{ pascalCaseName }}: {{ pascalCaseName }}Connector = functi
7171
7272 return {
7373 ...uiState,
74- // add this widget's ui state
74+ {{ camelCaseName }} : {
75+ // TODO: add this widget's ui state
76+ }
7577 };
7678 },
7779
@@ -93,7 +95,9 @@ export const connect{{ pascalCaseName }}: {{ pascalCaseName }}Connector = functi
9395 getRenderState(renderState, renderOptions) {
9496 return {
9597 ...renderState,
96- // call this.getWidgetRenderState(renderOptions)
98+ {{ camelCaseName }} : {
99+ // TODO: call this.getWidgetRenderState(renderOptions), possibly nested per attribute
100+ }
97101 };
98102 },
99103
@@ -105,11 +109,15 @@ export const connect{{ pascalCaseName }}: {{ pascalCaseName }}Connector = functi
105109 getWidgetRenderState({ results }) {
106110 if (!results) {
107111 // default rendering state without results
108- return {};
112+ return {
113+ widgetParams,
114+ };
109115 }
110116
111117 // rendering state when there are results
112- return {};
118+ return {
119+ widgetParams,
120+ };
113121 },
114122 };
115123 };
You can’t perform that action at this time.
0 commit comments