Skip to content

Conversation

chintankavathia
Copy link
Member

ghost loader when rowHeight is set to auto are broken.
see https://siemens.github.io/ngx-datatable/#/paging-scrolling-novirtualization

What kind of change does this PR introduce? (check one with "x")

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior? (You can also link to an open issue here)

What is the new behavior?

Does this PR introduce a breaking change? (check one with "x")

  • Yes
  • No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

Other information:

Copy link
Member

@spike-rabbit spike-rabbit left a comment

Choose a reason for hiding this comment

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

Code wise good, just need a little commit message adjustment.

fix: correctly calculate ghost-loader height if `rowHeight = 'auto'`

@chintankavathia chintankavathia force-pushed the fix/ghost-loaders branch 2 times, most recently from c67e7b2 to e5f80f8 Compare July 3, 2025 11:25
Copy link
Member

@spike-rabbit spike-rabbit left a comment

Choose a reason for hiding this comment

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

Found something while testing

Comment on lines 31 to 32
return rowHeight === 'auto' ? 100 / this.pageSize() + '%' : rowHeight + 'px';
};
Copy link
Member

Choose a reason for hiding this comment

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

After actually playing around with this, I think that in case of auto the calculation is not correct.

I guess ideally we would have 1em plus the padding of normal cells. But the padding is hard to get, as there is no variable for this. Can you please check if you can find a solution there? Otherwise we could also just assume stuff like 1.5em or so.

show border on each ghost element in case of cellMode is off and also hide outer ghost overlay if cellMode is on to avoid duplication.
Copy link
Member

@spike-rabbit spike-rabbit left a comment

Choose a reason for hiding this comment

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

Definitely an improvement. Not sure how breaking this is in terms of styling.

What about just always using the cell / row classes in the ghost loader? Than we don't need the borders and stuff. The only problem here would be that custom styling breaks. So we may need to wait for a major release. @fh1ch WDYT?

@fh1ch
Copy link
Member

fh1ch commented Jul 7, 2025

Definitely an improvement. Not sure how breaking this is in terms of styling.

What about just always using the cell / row classes in the ghost loader? Than we don't need the borders and stuff. The only problem here would be that custom styling breaks. So we may need to wait for a major release. @fh1ch WDYT?

@spike-rabbit I agree. I really like the changes. But if we go the proposed route and hence break custom styling (which seem to be not only used by us), this would indeed merit a breaking change.

@spike-rabbit
Copy link
Member

Then we should wait here until we start preparing v25

@fh1ch fh1ch added the bug Something isn't working label Jul 9, 2025
@spike-rabbit spike-rabbit added the breaking-changes Marks issues and PRs that are breaking the API label Jul 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-changes Marks issues and PRs that are breaking the API bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants