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.
When using the legacy scroll event as a fallback, the horizontal scroll event originates at the table element (.rt-table) and in React 16 and lower it bubbles up to the root element. However, React 17 no longer bubbles the scroll event (facebook/react#19464), preventing the scroll handler from running on the root element via getProps.
I have attempted to address this issue in React 17 by handling the scroll event on the table element directly via getTableProps. I have also ensured the calculatePos callback is only called on the table element itself (i.e. event.currentTarget === event.target) to maintain support for React 15 and 16.