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

Merged
merged 2 commits into from
Aug 28, 2024
Merged

fix: dataTable pagination #397

merged 2 commits into from
Aug 28, 2024

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

@ObservedObserver ObservedObserver merged commit 23e5838 into main Aug 28, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants