Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: dataTable pagination #397

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

fix: dataTable pagination #397

wants to merge 2 commits into from

Conversation

islxyqwe
Copy link
Member

fixed the pagination button appearence when there are many pages.
image

Copy link

vercel bot commented Jun 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
graphic-walker ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 26, 2024 10:10am
Copy link
Contributor

Risk Level 2 - /home/runner/work/graphic-walker/graphic-walker/packages/graphic-walker/jest.config.js

The changes in this file involve the removal of the preset and testEnvironment properties and the addition of the moduleNameMapper property in the Jest configuration. This change is low risk if the project no longer uses TypeScript or runs in a Node environment, and if the added module name mapping is correct. However, if the project still uses TypeScript or runs in a Node environment, this change could cause the tests to fail.

Suggested change:

module.exports = {
  preset: 'ts-jest',
  testEnvironment: 'node',
  moduleNameMapper: {
    '^@/(.*)$': '<rootDir>/src/$1',
  },
};

Risk Level 3 - /home/runner/work/graphic-walker/graphic-walker/packages/graphic-walker/src/components/dataTable/pagination.tsx

The changes in this file involve the addition of the getShowIndices function and changes to the Pagination component. The getShowIndices function appears to be complex and could potentially be simplified or broken down into smaller functions for better readability and maintainability. The changes to the Pagination component involve the use of the getShowIndices function and changes to the rendering of pagination items. These changes could potentially introduce bugs if not properly tested.

Suggested change:

// Simplify the getShowIndices function
function getShowIndices(total, pageIndex, pageSize, extendPageNumber) {
  // Simplified implementation
}

// Simplify the rendering of pagination items
function Pagination(props) {
  // Simplified implementation
}

🔧🧪📑


Powered by Code Review GPT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant