-
-
Notifications
You must be signed in to change notification settings - Fork 457
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
Disable hoverClass when disabling or destroying sortable element #672
Disable hoverClass when disabling or destroying sortable element #672
Conversation
src/html5sortable.ts
Outdated
@@ -145,6 +145,9 @@ const destroySortable = function (sortableElement) { | |||
const opts = data(sortableElement, 'opts') || {} | |||
const items = filter(sortableElement.children, opts.items) | |||
const handles = getHandles(items, opts.handle) | |||
// disable adding hover class | |||
console.log(opts) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You forgot a console.log here, can you please delete it, thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops. My bad 😄
Hey @mateuszpigula, This looks great and I am happy to test & merge it. Can you just quickly remove the one console.log that is still in there? Thanks |
Fixes #412
It adds
enableHoverClass(sortableElement, false)
indestroySortable
method anddisableSortable
method.I wanted to add tests to either
hoverClass.test.ts
orapi.test.ts
however:hoverClass
I wasn't able to usesortable(ul, 'disable')
properly.api.test
custom eventmousemove
is not triggering adding the hover class (of course I added this to config).Do not mince words please, it is my first contribution to open source ever 😄