thgreasi / ui-sortable-multiselection

Provide multiple element sorting in UI-Sortable
MIT License
30 stars 12 forks source link

Remove selected class when only a single element is selected #29

Closed geofreyflores closed 7 years ago

geofreyflores commented 7 years ago

Hi, I tried fixing the issue of removing the selected class when only a single item is selected. Looking for any feedback to see if I made the right change and if we can include in the repo. Thanks.

thgreasi commented 7 years ago

It looks correct. Please add a semicolon. Can you check whether the following also works?:

ui.item.removeClass('' + selectedItemClass);

Will review during the weekend.

thgreasi commented 7 years ago

Updated previous comment.

geofreyflores commented 7 years ago

My bad, will add the semicolon.

ui.item.parent().removeClass('' + selectedItemClass);

This only seems to remove class from the parent itself and not the children (i.e. the list).

thgreasi commented 7 years ago

That was a miss-post from my mobile. I actually updated that comment right after to read:

ui.item.removeClass('' + selectedItemClass);

Can you confirm whether that works? (I'm merging this anyway...)

geofreyflores commented 7 years ago

You're right, should've thought of that. Tested and seems to work. I'll include it in. Thanks for the review!

thgreasi commented 7 years ago

That's great! thanks! Resolves #28

thgreasi commented 7 years ago

Published as v0.7.0. Thanks for your contribution on this :+1: