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:
This pull request introduces a new feature to the Menu-Editor library by adding an
onDragEnd
event. This event is triggered when a user finishes dragging and dropping an item within the menu structure. TheonDragEnd
event is useful for capturing the final state of the menu after reordering items, allowing for updates or actions based on the new structure.Key Changes:
onDragEnd
event listener has been added to theMenuEditor
class. It can be registered using theonDragEnd(listener: Itemlistener)
method.makeItSortable
method, utilizing Sortable.js'sonEnd
callback to invoke the provided listener function.onDragEnd
event, detailing how to use it and providing example usage.Package Updates:
package-lock.json
file has been updated as a result of runningnpm update
. These updates include minor version bumps and dependency adjustments, as detailed in the attached diff file.Testing:
The new
onDragEnd
event has been tested locally by monitoring the menu's final state after drag-and-drop actions.Impact:
This update should be backward-compatible, as it only adds a new feature without altering existing functionality. However, users who install dependencies using the lock file should review the updated packages for potential impacts.