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.
The problem of the document auto-scrolling when trying to drag to the x-axis of the graph is improved (although not fixed entirely) by using existing
dnd-kit
configuration to reduce the size of the auto-scroll area. If we want to fine-tune the auto-scroll behavior based on the element being dragged over, for instance, we'll need to make more substantial modification todnd-kit
itself.The case table bug is fixed by patching
@dnd-kit/core
. The dnd-kit auto-scroll code maintains a mapping between scrollable elements and their bounding rects. In theuseRects()
hook, this test was used to determine when to recompute the rectangles associated with the scrollable elements:where
defaultValue$2
is the default empty array. This doesn't catch the situation in which the length of the elements array changes, which is the situation we were encountering. Changing the test to this fixes the bug:For now, we're just using
patch-package
to deploy the fix, but I plan to submit a PR to thednd-kit
repo to contribute the fix back.