{"action":"reopened","issue":{"url":"https://api.github.com/repos/select2/select2/issues/4279","repository_url":"https://api.github.com/repos/select2/select2","labels_url":"https://api.github.com/repos/select2/select2/issues/4279/labels{/name}","comments_url":"https://api.github.com/repos/select2/select2/issues/4279/comments","events_url":"https://api.github.com/repos/select2/select2/issues/4279/events","html_url":"https://github.com/select2/select2/issues/4279","id":145147024,"number":4279,"title":"(Feature) Setting disabled option as a value does not show the value as diabled (multiple)","user":{"login":"RobertDiebels","id":694779,"avatar_url":"https://avatars.githubusercontent.com/u/694779?v=3","gravatar_id":"","url":"https://api.github.com/users/RobertDiebels","html_url":"https://github.com/RobertDiebels","followers_url":"https://api.github.com/users/RobertDiebels/followers","following_url":"https://api.github.com/users/RobertDiebels/following{/other_user}","gists_url":"https://api.github.com/users/RobertDiebels/gists{/gist_id}","starred_url":"https://api.github.com/users/RobertDiebels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobertDiebels/subscriptions","organizations_url":"https://api.github.com/users/RobertDiebels/orgs","repos_url":"https://api.github.com/users/RobertDiebels/repos","events_url":"https://api.github.com/users/RobertDiebels/events{/privacy}","received_events_url":"https://api.github.com/users/RobertDiebels/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/select2/select2/labels/4.x","name":"4.x","color":"c7def8"},{"url":"https://api.github.com/repos/select2/select2/labels/bug","name":"bug","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-01T10:44:08Z","updated_at":"2016-05-04T14:05:11Z","closed_at":null,"body":"## Prerequisites\r\n\r\n- [x] I have searched for similar issues in both open and closed tickets and cannot find a duplicate\r\n- [x] The issue still exists against the latest `master` branch of Select2\r\n- [x] This is not a usage question (Those should be directed to the [community](https://select2.github.io/community.html))\r\n- [x] I have attempted to find the simplest possible steps to reproduce the issue\r\n- [ ] I have included a failing test as a pull request (Optional)\r\n\r\n## Steps to reproduce the issue\r\n\r\n1. Create a select element and some options of which one is disabled.\r\n2. Initialize select2 on the element.\r\n3. Set the values to contain the disabled option.\r\n\r\n## Expected behavior and actual behavior\r\n\r\nWhen I follow those steps, I see...\r\n\r\nThat the values are being selected and shown.\r\n\r\nI was expecting...\r\n\r\nTo have a way to differentiate between which value is a disabled one and which is not.\r\nIn this case it would be nice to have a class on the li-element representing the option, that shows that the corresponding option has been disabled.\r\n\r\nIf take a look at this url: http://jsbin.com/ludamalepi/edit?html,output\r\n\r\nI would expect that the tag (the li ) would have something like a border, or be grayed out. Or that I can customize it by altering the CSS associated with a disabled value (li ).\r\n\r\n### Reasoning\r\n\r\nThe reason we would like to do this is because we use select2 in forms where data that was previously avaible, could have been removed. So when we have stored a value that has been removed elsewhere, we feed select2 with data and mark the data that has been removed/marked inactive/temporarily disabled as disabled.\r\n\r\nHowever it might have been that the value has not been removed/marked on purpose. So the user needs to know that this value has been removed by viewing the tags in the field. Not just in the dropdown.\r\n\r\nI realize that the disabled values are not provided when I call .val() (which is expected). However, due to the fact that the disabled value may have been temporarily disabled or not purposely marked inactive we need to give feedback about this to the user (they need to know that the value they submit will not be submitted if it has been disabled elsewhere).\r\n\r\nI hope this makes sense. If not, I will be happy to clarify.\r\n\r\n## Environment\r\n\r\nBrowsers\r\n\r\n- [x] Google Chrome\r\n- [ ] Mozilla Firefox\r\n- [ ] Internet Explorer\r\n\r\nOperating System\r\n\r\n- [x] Windows\r\n- [ ] Mac OS X\r\n- [ ] Linux\r\n- [ ] Mobile\r\n\r\nLibraries\r\n\r\n- jQuery version: 2.1.4\r\n- Select2 version: 4.0.2\r\n\r\n## Isolating the problem\r\n\r\n- [ ] This bug happens [on the examples page](https://select2.github.io/examples.html)\r\n- [x] The bug happens consistently across all tested browsers\r\n- [x] This bug happens when using Select2 without other pluigns\r\n- [x] I can reproduce this bug in [a jsbin](http://jsbin.com/ludamalepi/edit?html,output)\r\n"}}