-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove ripple effect in dimension list when drag starts/ends (#584)
There are 2 separate fixes in this PR: * Remove "ripple" effect on drag start (where other items in the list briefly shift position when an item above it is dragged). ** Add transform: none !important to all items not being dragged to remove ripple effect when a drag is started or finished. The ripple effect was solved previously when there was only 1 list, but with 3 separate lists introduced with the Sections, it was necessary to implement differently ** Use a local variable for incrementing the dnd index for dnd to remove the console warning about duplicate, non-sequential indexes. This duplicate, non-sequential indexes was also causing unexpected onDrag movements, similar to the "ripple" effect. * Show correct dimension icon on the clone (the clone is shown while dragging). ** use the dimension id for the id property of DimensionItem. The id prop is not actually used as a css attribute, but is used to determine the icon, and the options click behaviour. Since the clone doesn't get an onOptionsClick, the fact that the id is duplicated doesn't matter. But the actual dimension id is needed to get the correct icon.
- Loading branch information
1 parent
ac8c383
commit c91ed3b
Showing
3 changed files
with
11 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters