Skip to content

Commit

Permalink
fix(commerce): use 0-based indexing for search box (#3488)
Browse files Browse the repository at this point in the history
use 0-based indexing for page
  • Loading branch information
Spuffynism authored Dec 15, 2023
1 parent e68025b commit 1ec9ff8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ describe('headless search box', () => {
});

it('updates the page to the first one', () => {
expect(engine.actions).toContainEqual(selectPage(1));
expect(engine.actions).toContainEqual(selectPage(0));
});

it('dispatches #executeSearch', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export function buildSearchBox(

dispatch(updateFacetAutoSelection({allow: true}));
dispatch(updateQuery({query: getValue()}));
dispatch(selectPage(1));
dispatch(selectPage(0));
dispatch(executeSearch());
};

Expand Down

0 comments on commit 1ec9ff8

Please sign in to comment.