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 table row indices to handle headers and footers correctly #67

Merged
merged 3 commits into from
May 19, 2024

Conversation

Kyziq
Copy link
Contributor

@Kyziq Kyziq commented May 17, 2024

This pull request addresses the issue where row indices do not start from 0 when using headers in the ShadTable component. The changes ensure that the effective row count is calculated correctly and that row indices are adjusted accordingly.

Changes:

  • Adjusted effectiveRowCount to account for headers and footers.
  • Modified cellBuilder to correctly adjust row indices when a header is present.

Issue Reference:
closes #66

Testing:
Tested with a table that includes headers and footers to ensure all rows are displayed correctly.

@Kyziq Kyziq changed the title 🐛 fix(table): table row indices to handle headers and footers correctly Fix table row indices to handle headers and footers correctly May 17, 2024
lib/src/components/table.dart Outdated Show resolved Hide resolved
@nank1ro nank1ro self-assigned this May 17, 2024
@nank1ro nank1ro added the bug Something isn't working label May 17, 2024
Copy link
Owner

@nank1ro nank1ro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nank1ro nank1ro merged commit ced83bd into nank1ro:main May 19, 2024
@Kyziq Kyziq deleted the fix-table-row-indices branch May 19, 2024 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Table row indices not starting from 0 when using headers.
2 participants