orchidjs / tom-select

Tom Select is a lightweight (~16kb gzipped) hybrid of a textbox and select box. Forked from selectize.js to provide a framework agnostic autocomplete widget with native-feeling keyboard navigation. Useful for tagging, contact lists, etc.
https://tom-select.js.org
Apache License 2.0
1.66k stars 122 forks source link

Spinner animation for remote data loading is not smooth #622

Open zipper opened 1 year ago

zipper commented 1 year ago

Describe the bug When remote data is used, the animation for the spinner keeps restarting when writing the search term. I believe it is because the spinner is reinserted with each keystroke.

To Reproduce Create an example on JSFiddle, CodePen or similar service and outline the steps for reproducing the bug.

  1. Go to https://tom-select.js.org/examples/remote/
  2. Open the select and start writing
  3. See error as the animation keeps restarting.

Expected behavior Once the spinner is inserted, the animation should smoothly run until the spinner is removed.

Additional context Add any other context about the problem here.