Skip to content

Commit 4392164

Browse files
authored
Merge pull request #448 from yext/hotfix/v1.6.1
Version 1.6.1
2 parents 2c1016e + 04d659c commit 4392164

9 files changed

Lines changed: 13 additions & 10 deletions

File tree

4.6 KB
Loading
4.6 KB
Loading
-5.26 KB
Loading
4.44 KB
Loading

THIRD-PARTY-NOTICES

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10271027

10281028
The following NPM package may be included in this product:
10291029

1030-
- @yext/search-headless@2.5.0
1030+
- @yext/search-headless@2.5.1
10311031

10321032
This package contains the following license and notice below:
10331033

package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@yext/search-ui-react",
3-
"version": "1.6.0",
3+
"version": "1.6.1",
44
"description": "A library of React Components for powering Yext Search integrations",
55
"author": "slapshot@yext.com",
66
"license": "BSD-3-Clause",

src/components/Pagination.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ export function Pagination(props: PaginationProps): JSX.Element | null {
7676
const navigateToPage = useCallback((newPageNumber: number) => {
7777
const newOffset = limit * (newPageNumber - 1);
7878
searchActions.setOffset(newOffset);
79+
searchActions.setIsPagination(true);
7980
executeSearch(searchActions);
8081
reportAnalyticsEvent(newPageNumber, currentPageNumber, maxPageCount);
8182
}, [searchActions, limit, maxPageCount, currentPageNumber, reportAnalyticsEvent]);

tests/components/Pagination.test.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const mockedState: Partial<State> = {
1818

1919
const mockedActions = {
2020
state: mockedState,
21+
setIsPagination: jest.fn(),
2122
setOffset: jest.fn(),
2223
executeVerticalQuery: jest.fn()
2324
};
@@ -157,6 +158,7 @@ describe('results are returned from search', () => {
157158
// navigate to the last results page
158159
await userEvent.click(screen.getByText(`${mockedResultsCount}`));
159160
expect(actions.setOffset).toHaveBeenCalledWith(mockedResultsCount - 1);
161+
expect(actions.setIsPagination).toHaveBeenCalledWith(true);
160162
expect(actions.executeVerticalQuery).toHaveBeenCalledTimes(1);
161163
});
162164
});

0 commit comments

Comments
 (0)