Skip to content
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

[Bufgix] After sorting elements with drag and drop, the same items should stay selected #214

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

cibernox
Copy link
Collaborator

@cibernox cibernox commented Aug 30, 2024

Before this change, when sibling elements were reordered with drag and drop, the selected element changed after the drop.

The root cause is that the currently selected elements is stored with a "path" (e.g. 1.4.3.0.2, meaning the "the third, child of the first child of the fourth child o the fifth child of the second element in the page"), and the last number of that path has to be updated to reflect the new position of the dropped element among its siblings.

@cibernox cibernox self-assigned this Aug 30, 2024
@cibernox cibernox merged commit 2ed25b1 into main Aug 30, 2024
2 of 3 checks passed
@cibernox cibernox deleted the fix-selected-item-changing-after-reordering branch August 30, 2024 16:17
@cbroeren
Copy link
Collaborator

@cibernox Quality check failed on this PR before merging

cbroeren added a commit that referenced this pull request Aug 30, 2024
* main:
  Update DragMenuOption.svelte (#214)
  Update changelog
  v0.1.0-rc.1
  Update changelog
  Shared event handlers (#195)
  v0.1.0-rc.1 changelog
  Issue 203: Disable dragLeave trigger on drag placeholder (#208)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants