Skip to content

Commit

Permalink
fix(index): pass initial ui state
Browse files Browse the repository at this point in the history
  • Loading branch information
Haroenv committed Apr 24, 2020
1 parent 270261d commit 5938969
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/widgets/index/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,10 @@ const index = (props: IndexProps): Index => {
widget.init({
helper: helper!,
parent: this,
uiState: {},
// Only index widget uses this key. This means that the initial value
// is sufficient, since that index didn't yet exist. If we see wrong
// behavior with this, use mainIndex.getWidgetState()
uiState: localInstantSearchInstance._initialUiState,
instantSearchInstance: localInstantSearchInstance,
state: helper!.state,
templatesConfig: localInstantSearchInstance.templatesConfig,
Expand Down

0 comments on commit 5938969

Please sign in to comment.