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): incorrect fixed column style in RTL #2296

Merged
merged 1 commit into from
Dec 26, 2024

Conversation

capdiem
Copy link
Contributor

@capdiem capdiem commented Dec 26, 2024

No description provided.

@capdiem capdiem requested a review from Copilot December 26, 2024 01:17

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • src/Masa.Blazor/wwwroot/css/masa-blazor.extend.css: Language not supported
Comments suppressed due to low confidence (2)

src/Masa.Blazor/wwwroot/js/masa-blazor.js:1594

  • Changing the condition from 'Math.abs(scrollWidth -((rtl ? -scrollLeft : scrollLeft) + clientWidth)) < 1' to 'scrollWidth == clientWidth' might introduce a bug. The original condition checks for a small margin of error, while the new condition checks for an exact match, which might not work correctly in all cases.
if (scrollWidth == clientWidth) {

src/Masa.Blazor.JS/src/interop.ts:1607

  • The condition scrollLeft == 0 does not account for RTL scenarios. The original condition Math.abs(scrollLeft - (rtl ? scrollWidth - clientWidth : 0)) < 1 should be used to ensure correct behavior in both LTR and RTL modes.
else if (scrollLeft == 0) {
@Qinyouzeng Qinyouzeng merged commit ee638c1 into main Dec 26, 2024
1 check passed
@Qinyouzeng Qinyouzeng deleted the bugfix/datatable-fixed-styles branch December 26, 2024 01:21
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