lcdsantos / jQuery-Selectric

jQuery plugin for easy manipulation and customization of HTML selects
http://selectric.js.org/
MIT License
727 stars 157 forks source link

Fix #180 #214

Closed Epiphero closed 7 years ago

Epiphero commented 7 years ago

As per the jQuery docs, returning false from the each callback will stop the loop. That way the 1st matching element will be highlighted, not the last. This should resolve #180.

codecov-io commented 7 years ago

Codecov Report

Merging #214 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #214   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           1      1           
  Lines         391    391           
=====================================
  Hits          391    391
Impacted Files Coverage Δ
src/jquery.selectric.js 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e88edc4...c95fc9a. Read the comment docs.

gearsdigital commented 7 years ago

Thank you very much for your PR. Glad you fixed that issue!

Before this is going to be merged, could please provide a test case?

Regards!

Epiphero commented 7 years ago

@gearsdigital Sure thing: I committed two tests, one for each of the changed code paths.

gearsdigital commented 7 years ago

Awesome! :) I'll test and verfiy it later this day…

Kamyil commented 7 months ago

Not sure whever this library is still maintained or not but... wondering why this PR was not released? It's definitely fixing the issue, however while using Selectric 1.13.0 from npm it does not appear to have this change