Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rowsncolumns/grid

Package Overview
Dependencies
Maintainers
1
Versions
194
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rowsncolumns/grid - npm Package Compare versions

Comparing version 9.0.0 to 9.0.1

4

dist/hooks/usePagination.d.ts

@@ -8,5 +8,5 @@ import React from "react";

/**
* Initial current page index. Start from 1
* Initial page index. Start from 1
*/
initialCurrentPage?: number;
initialPage?: number;
/**

@@ -13,0 +13,0 @@ * Total number of rows

@@ -32,4 +32,4 @@ "use strict";

const usePagination = (props) => {
const { initialCurrentPage = 1, pageSize = 10, total = 0, onChange, component = PaginationComponent, } = props;
const [currentPage, setCurrentPage] = (0, react_1.useState)(initialCurrentPage);
const { initialPage = 1, pageSize = 10, total = 0, onChange, component = PaginationComponent, } = props;
const [currentPage, setCurrentPage] = (0, react_1.useState)(initialPage);
const totalPages = Math.ceil(total / pageSize);

@@ -36,0 +36,0 @@ const nextPage = () => setCurrentPage((prev) => Math.min(prev + 1, totalPages));

{
"name": "@rowsncolumns/grid",
"description": "Declarative React Canvas Grid primitive for Data table, Pivot table, Excel Worksheets",
"version": "9.0.0",
"version": "9.0.1",
"main": "dist/index.tsx",

@@ -46,3 +46,3 @@ "license": "MIT",

},
"gitHead": "272c80dcd474a9346b6927b356d37917cfcd7c84"
"gitHead": "48ddc53ff8b698acf38609bb12db45c2cab49bbe"
}

@@ -14,7 +14,7 @@ // @ts-nocheck

expect(result.error.message).toBe(
"Cannot read properties of undefined (reading 'initialCurrentPage')"
"Cannot read properties of undefined (reading 'initialPage')"
);
});
it("sets initialCurrentpage to 1", () => {
it("sets initialPage to 1", () => {
const { result } = renderHook(() => usePagination(options));

@@ -21,0 +21,0 @@ expect(result.current.currentPage).toBe(1);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc