{"action":"opened","issue":{"url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/4240","labels_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/4240/labels{/name}","comments_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/4240/comments","events_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/4240/events","html_url":"https://github.com/silverstripe/silverstripe-framework/issues/4240","id":82346564,"number":4240,"title":"Cannot Deselect Last Item in TreeMultiselectField","user":{"login":"purplespider","id":329880,"avatar_url":"https://avatars.githubusercontent.com/u/329880?v=3","gravatar_id":"","url":"https://api.github.com/users/purplespider","html_url":"https://github.com/purplespider","followers_url":"https://api.github.com/users/purplespider/followers","following_url":"https://api.github.com/users/purplespider/following{/other_user}","gists_url":"https://api.github.com/users/purplespider/gists{/gist_id}","starred_url":"https://api.github.com/users/purplespider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/purplespider/subscriptions","organizations_url":"https://api.github.com/users/purplespider/orgs","repos_url":"https://api.github.com/users/purplespider/repos","events_url":"https://api.github.com/users/purplespider/events{/privacy}","received_events_url":"https://api.github.com/users/purplespider/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-29T09:19:00Z","updated_at":"2015-05-29T09:19:00Z","closed_at":null,"body":"When deselecting the last item from a TreeMultiselectField, despite the checkbox becoming unticked, the item remains as the field's value.\r\n\r\n**To reproduce:**\r\n1. Create a TreeMultiselectField\r\n2. In the CMS open the drop-down and tick more than one item. Each ticked item appears in the field's value.\r\n3. Untick an item and it is correctly removed from the field's value.\r\n4. Untick the last item.\r\n\r\n**What happens:**\r\nDespite being unticked, it's value remains listed in the field.\r\n\r\n**What I expect to happen:**\r\nThe name of the last item to be removed from the field's value, and the default \"(Choose)\" text to appear, indicating that no items have been selected.\r\n\r\n ![](http://spdr.me/5vsN+)"}}