Skip to content

Commit

Permalink
RC #291 - Updating range logic in Typesense utils
Browse files Browse the repository at this point in the history
  • Loading branch information
dleadbetter committed Aug 14, 2024
1 parent 88fa1ef commit e078cd6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/core-data/src/utils/Typesense.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const createRouting = (config: TypesenseConfig) => ({
},

routeToState: (state: any) => {
const { q, event_range_facet: range, ...facets } = state;
const { q, event_range_facet: eventRangeFacet, ...facets } = state;

console.log(state);

Expand All @@ -77,7 +77,10 @@ const createRouting = (config: TypesenseConfig) => ({

if (Object.keys(facets).length > 0) {
uiState[config.index_name].refinementList = facets;
uiState[config.index_name].range = range;
}

if (eventRangeFacet) {
uiState[config.index_name].range = { event_range_facet: eventRangeFacet };
}

return uiState;
Expand Down

0 comments on commit e078cd6

Please sign in to comment.