{"action":"created","issue":{"url":"https://api.github.com/repos/ppy/osu-framework/issues/1945","repository_url":"https://api.github.com/repos/ppy/osu-framework","labels_url":"https://api.github.com/repos/ppy/osu-framework/issues/1945/labels{/name}","comments_url":"https://api.github.com/repos/ppy/osu-framework/issues/1945/comments","events_url":"https://api.github.com/repos/ppy/osu-framework/issues/1945/events","html_url":"https://github.com/ppy/osu-framework/issues/1945","id":365424584,"node_id":"MDU6SXNzdWUzNjU0MjQ1ODQ=","number":1945,"title":"Allow dropdown to handle invalid values","user":{"login":"AtomCrafty","id":4553050,"node_id":"MDQ6VXNlcjQ1NTMwNTA=","avatar_url":"https://avatars2.githubusercontent.com/u/4553050?v=4","gravatar_id":"","url":"https://api.github.com/users/AtomCrafty","html_url":"https://github.com/AtomCrafty","followers_url":"https://api.github.com/users/AtomCrafty/followers","following_url":"https://api.github.com/users/AtomCrafty/following{/other_user}","gists_url":"https://api.github.com/users/AtomCrafty/gists{/gist_id}","starred_url":"https://api.github.com/users/AtomCrafty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AtomCrafty/subscriptions","organizations_url":"https://api.github.com/users/AtomCrafty/orgs","repos_url":"https://api.github.com/users/AtomCrafty/repos","events_url":"https://api.github.com/users/AtomCrafty/events{/privacy}","received_events_url":"https://api.github.com/users/AtomCrafty/received_events","type":"User","site_admin":false},"labels":[{"id":780552344,"node_id":"MDU6TGFiZWw3ODA1NTIzNDQ=","url":"https://api.github.com/repos/ppy/osu-framework/labels/user%20interface","name":"user interface","color":"0052cc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":28,"created_at":"2018-10-01T11:47:38Z","updated_at":"2018-10-11T15:38:16Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"A `Dropdown` will currently fault when the underlying `Bindable` is updated to a value not present in the dropdown.\r\n\r\nHere are two ideas to circumvent this:\r\n- Add the \"invalid\" value as a temporary `DropdownMenuItem` and delete it once the selection is changed.\r\nThis would allow to display the selected value temporarily and allow the user to keep it (which may or may not be desirable depending on the situation)\r\n- Restore the \"default\" value and update the `Bindable` accordingly.\r\nCould be either a fallback to the first item in the list or an optional delegate to retrieve a valid value from an invalid one (more flexible).\r\nThis might result in an infinite feedback loop of `Bindable` updates if used improperly.\r\n\r\nCauses ppy/osu#3474"},"comment":{"url":"https://api.github.com/repos/ppy/osu-framework/issues/comments/429003488","html_url":"https://github.com/ppy/osu-framework/issues/1945#issuecomment-429003488","issue_url":"https://api.github.com/repos/ppy/osu-framework/issues/1945","id":429003488,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTAwMzQ4OA==","user":{"login":"AtomCrafty","id":4553050,"node_id":"MDQ6VXNlcjQ1NTMwNTA=","avatar_url":"https://avatars2.githubusercontent.com/u/4553050?v=4","gravatar_id":"","url":"https://api.github.com/users/AtomCrafty","html_url":"https://github.com/AtomCrafty","followers_url":"https://api.github.com/users/AtomCrafty/followers","following_url":"https://api.github.com/users/AtomCrafty/following{/other_user}","gists_url":"https://api.github.com/users/AtomCrafty/gists{/gist_id}","starred_url":"https://api.github.com/users/AtomCrafty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AtomCrafty/subscriptions","organizations_url":"https://api.github.com/users/AtomCrafty/orgs","repos_url":"https://api.github.com/users/AtomCrafty/repos","events_url":"https://api.github.com/users/AtomCrafty/events{/privacy}","received_events_url":"https://api.github.com/users/AtomCrafty/received_events","type":"User","site_admin":false},"created_at":"2018-10-11T15:38:16Z","updated_at":"2018-10-11T15:38:16Z","author_association":"CONTRIBUTOR","body":"You may want multiple entries with different labels, that correspond to the same value when selected."}}
{"actor":{"display_login":"AtomCrafty"}}