Skip to content

Add a removeCurrentItems parameter to clearOptions() to allow for either intended behavior #2147

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dvg-p4
Copy link

@dvg-p4 dvg-p4 commented Oct 9, 2024

  • clearOptions() now, by default, removes currently-selected items in addition to deselecting them,
    as it did prior to selectize v0.12.5.
    • This behavior is controlled by a new parameter removeCurrentItems, default true.
    • If removeCurrentItems is set false, the function will instead leave currently-selected items
      available and selected, as was the case from selectize v0.12.5, until v0.13.1 introduced
      #2146 (which this change fixes).
    • For consistency, silent also has a (backwards-compatible) default value of false now.
    • Thus, the full signature is now clearOptions(silent = false, removeCurrentItems = true)

I don't feel very strongly about the new parameter being default true, as long as whatever its default value is, is correctly and comprehensively documented. You could make the argument either way.

@dvg-p4
Copy link
Author

dvg-p4 commented Feb 7, 2025

Let me preempt the bot marking this PR as stale by saying that it continues to be fully ready for review.

Copy link
Contributor

github-actions bot commented Jun 8, 2025

This pull request is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days

@dvg-p4
Copy link
Author

dvg-p4 commented Jun 9, 2025

If this repo is at all being maintained, I'd personally recommend either working through the backlog of issues and PRs more frequently than your bot marks issues as stale, or turning off that functionality of your bot if you can't commit to that schedule (totally understandable, this is FOSS).

@databyte
Copy link
Collaborator

databyte commented Jun 9, 2025

I try to help with maintenance but I have no way to build and release so it's seemingly harder and harder to maintain if we can't get faster releases out.

@dvg-p4
Copy link
Author

dvg-p4 commented Jun 9, 2025

I try to help with maintenance but I have no way to build and release so it's seemingly harder and harder to maintain if we can't get faster releases out.

no worries, I get it! let's consolidate further discussion of "is anyone actually maintaining this at all" under the ticket you just made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

clearOptions() deselects currently-selected items, but does not remove them as options clearOptions should not clear items
2 participants