-
Notifications
You must be signed in to change notification settings - Fork 28
fix: ghost loaders height #292
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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'`
c67e7b2
to
e5f80f8
Compare
There was a problem hiding this 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
return rowHeight === 'auto' ? 100 / this.pageSize() + '%' : rowHeight + 'px'; | ||
}; |
There was a problem hiding this comment.
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.
e5f80f8
to
ec9f131
Compare
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.
ec9f131
to
dee5ee1
Compare
There was a problem hiding this 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?
@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. |
Then we should wait here until we start preparing v25 |
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")
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")
If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...
Other information: