xw - fix the bug that the right shadow sometimes displays when it shouldn't have #108
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
In some cases, the right shadow of the report displays even if no more content to the right of the last column on the screen.
Turns out the bug is due to the way we treated
totalWidth
in this line of the PR #58Under some certain circumstances, re-assigning column widths based on current window width for example, the
totalWidth
could be a decimal like180.001
, and it will lead the componentFixedDataTableRow
rendering the right shadow all the time.To take care of such cases, we need to convert
totalWidth
to an Integer byMath.floor(totalWidth)
in order to make sure the right column shadow won't display when it shouldn't.Motivation and Context
To show a column shadow when it shouldn't have could be misleading. It makes people think there are more data to the right of the last column on the screen, even though that's not true at all.
How Has This Been Tested?
It's a very minor changes and I tested it manually on a number of browsers.
Screenshots (if appropriate):
Types of changes
Checklist: