diff --git a/.storybook/snapshots/__snapshots__/mapboxmap--custom-pin.png b/.storybook/snapshots/__snapshots__/mapboxmap--custom-pin.png index 14a82b56..ccc96dda 100644 Binary files a/.storybook/snapshots/__snapshots__/mapboxmap--custom-pin.png and b/.storybook/snapshots/__snapshots__/mapboxmap--custom-pin.png differ diff --git a/.storybook/snapshots/__snapshots__/mapboxmap--custom-render-pin.png b/.storybook/snapshots/__snapshots__/mapboxmap--custom-render-pin.png index 14a82b56..ccc96dda 100644 Binary files a/.storybook/snapshots/__snapshots__/mapboxmap--custom-render-pin.png and b/.storybook/snapshots/__snapshots__/mapboxmap--custom-render-pin.png differ diff --git a/.storybook/snapshots/__snapshots__/mapboxmap--multiple-pins.png b/.storybook/snapshots/__snapshots__/mapboxmap--multiple-pins.png index f4fb41d9..3708ee6c 100644 Binary files a/.storybook/snapshots/__snapshots__/mapboxmap--multiple-pins.png and b/.storybook/snapshots/__snapshots__/mapboxmap--multiple-pins.png differ diff --git a/.storybook/snapshots/__snapshots__/mapboxmap--primary.png b/.storybook/snapshots/__snapshots__/mapboxmap--primary.png index a4c27597..ceaf48b3 100644 Binary files a/.storybook/snapshots/__snapshots__/mapboxmap--primary.png and b/.storybook/snapshots/__snapshots__/mapboxmap--primary.png differ diff --git a/THIRD-PARTY-NOTICES b/THIRD-PARTY-NOTICES index 4ea74aaa..3fe27465 100644 --- a/THIRD-PARTY-NOTICES +++ b/THIRD-PARTY-NOTICES @@ -1027,7 +1027,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The following NPM package may be included in this product: - - @yext/search-headless@2.5.0 + - @yext/search-headless@2.5.1 This package contains the following license and notice below: diff --git a/package-lock.json b/package-lock.json index 74f8b475..554f0c45 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@yext/search-ui-react", - "version": "1.6.0", + "version": "1.6.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@yext/search-ui-react", - "version": "1.6.0", + "version": "1.6.1", "license": "BSD-3-Clause", "dependencies": { "@restart/ui": "^1.0.1", @@ -11193,9 +11193,9 @@ } }, "node_modules/@yext/search-headless": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@yext/search-headless/-/search-headless-2.5.0.tgz", - "integrity": "sha512-Ii2dDHxaD0sKrmqbmZt3VEWBIk+U2/p7e0LufruoScRUWtOtD1ASh7QBNjR6okGMVqsfdFWrFxQ7x5QRDxLccA==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@yext/search-headless/-/search-headless-2.5.1.tgz", + "integrity": "sha512-GrBDJ+46pMv1qvOd+4svkT81mcUv7WNTkUYceBEmi4KPMF/WZ7DhkKue9j5qkhJcfaYwUBYrBfXwmb9vmm/Y6Q==", "dev": true, "dependencies": { "@reduxjs/toolkit": "^1.8.1", @@ -35520,9 +35520,9 @@ } }, "@yext/search-headless": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@yext/search-headless/-/search-headless-2.5.0.tgz", - "integrity": "sha512-Ii2dDHxaD0sKrmqbmZt3VEWBIk+U2/p7e0LufruoScRUWtOtD1ASh7QBNjR6okGMVqsfdFWrFxQ7x5QRDxLccA==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@yext/search-headless/-/search-headless-2.5.1.tgz", + "integrity": "sha512-GrBDJ+46pMv1qvOd+4svkT81mcUv7WNTkUYceBEmi4KPMF/WZ7DhkKue9j5qkhJcfaYwUBYrBfXwmb9vmm/Y6Q==", "dev": true, "requires": { "@reduxjs/toolkit": "^1.8.1", diff --git a/package.json b/package.json index e221d029..8616a14c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@yext/search-ui-react", - "version": "1.6.0", + "version": "1.6.1", "description": "A library of React Components for powering Yext Search integrations", "author": "slapshot@yext.com", "license": "BSD-3-Clause", diff --git a/src/components/Pagination.tsx b/src/components/Pagination.tsx index 01892c19..f401ced5 100644 --- a/src/components/Pagination.tsx +++ b/src/components/Pagination.tsx @@ -76,6 +76,7 @@ export function Pagination(props: PaginationProps): JSX.Element | null { const navigateToPage = useCallback((newPageNumber: number) => { const newOffset = limit * (newPageNumber - 1); searchActions.setOffset(newOffset); + searchActions.setIsPagination(true); executeSearch(searchActions); reportAnalyticsEvent(newPageNumber, currentPageNumber, maxPageCount); }, [searchActions, limit, maxPageCount, currentPageNumber, reportAnalyticsEvent]); diff --git a/tests/components/Pagination.test.tsx b/tests/components/Pagination.test.tsx index 74c055d0..92bd34b6 100644 --- a/tests/components/Pagination.test.tsx +++ b/tests/components/Pagination.test.tsx @@ -18,6 +18,7 @@ const mockedState: Partial = { const mockedActions = { state: mockedState, + setIsPagination: jest.fn(), setOffset: jest.fn(), executeVerticalQuery: jest.fn() }; @@ -157,6 +158,7 @@ describe('results are returned from search', () => { // navigate to the last results page await userEvent.click(screen.getByText(`${mockedResultsCount}`)); expect(actions.setOffset).toHaveBeenCalledWith(mockedResultsCount - 1); + expect(actions.setIsPagination).toHaveBeenCalledWith(true); expect(actions.executeVerticalQuery).toHaveBeenCalledTimes(1); }); });