Skip to content
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

Add tooltip (title) to the 'remove all' 'X' icon #4530

Closed
Loadmaster opened this issue Aug 12, 2016 · 3 comments
Closed

Add tooltip (title) to the 'remove all' 'X' icon #4530

Loadmaster opened this issue Aug 12, 2016 · 3 comments

Comments

@Loadmaster
Copy link

Loadmaster commented Aug 12, 2016

Enhancement request

Could we please add a title attribute to the "remove all tags" '×' span element? In the AllowClear.prototype.update function definition, something along the lines of:

  AllowClear.prototype.update = function (decorated, data) {
    ...
    var $remove = $(
      '<span class="select2-selection__clear" title="Remove all items">' +    //<<modified line
        '&times;' +
      '</span>'
    );
    ...
  };

(I would do it myself (for v4.0.3), but I don't have the GIT infrastructure on my PC here.)

If we really wanted to get fancy, this could be (yet another) configuration options setting:

var select2Opts = { ..., removeAllTip: "Remove all items", ... };
@Loadmaster Loadmaster changed the title Add tooltip (title) to remove all 'X' icon Add tooltip (title) to the 'remove all' 'X' icon Aug 12, 2016
@alexweissman
Copy link
Contributor

This appears to be a duplicate of #4456.

@alexweissman
Copy link
Contributor

Actually, #4456 is about the clear icon for individual selections, whereas this request is for the "clear all" icon when using allowClear.

@alexweissman alexweissman reopened this Dec 25, 2017
@nisha-kaushik
Copy link
Contributor

I would like to pick this up as my initial contribution.

nisha-kaushik pushed a commit to nisha-kaushik/select2 that referenced this issue May 14, 2018
nisha-kaushik pushed a commit to nisha-kaushik/select2 that referenced this issue Sep 15, 2018
nisha-kaushik pushed a commit to nisha-kaushik/select2 that referenced this issue Sep 15, 2018
pedrofurtado pushed a commit that referenced this issue Sep 15, 2018
* #4530 Add tooltip (title) to the 'remove all' 'X' icon.

* #4530 Add tooltip (title) to the 'remove all' 'X' icon.

* #4530 Add tooltip (title) to the 'remove all'

* Revert dist folder.

* add tk.js from pull request.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants