{"action":"opened","issue":{"url":"https://api.github.com/repos/volkanceylan/Serenity/issues/1661","repository_url":"https://api.github.com/repos/volkanceylan/Serenity","labels_url":"https://api.github.com/repos/volkanceylan/Serenity/issues/1661/labels{/name}","comments_url":"https://api.github.com/repos/volkanceylan/Serenity/issues/1661/comments","events_url":"https://api.github.com/repos/volkanceylan/Serenity/issues/1661/events","html_url":"https://github.com/volkanceylan/Serenity/issues/1661","id":196416442,"number":1661,"title":"select2Editor with createSearchChoice initialize value not right","user":{"login":"tky753","id":18205977,"avatar_url":"https://avatars.githubusercontent.com/u/18205977?v=3","gravatar_id":"","url":"https://api.github.com/users/tky753","html_url":"https://github.com/tky753","followers_url":"https://api.github.com/users/tky753/followers","following_url":"https://api.github.com/users/tky753/following{/other_user}","gists_url":"https://api.github.com/users/tky753/gists{/gist_id}","starred_url":"https://api.github.com/users/tky753/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tky753/subscriptions","organizations_url":"https://api.github.com/users/tky753/orgs","repos_url":"https://api.github.com/users/tky753/repos","events_url":"https://api.github.com/users/tky753/events{/privacy}","received_events_url":"https://api.github.com/users/tky753/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-19T13:42:52Z","updated_at":"2016-12-19T13:42:52Z","closed_at":null,"body":"I overload select2Editor.getSelect2Options\r\n```\r\n        getSelect2Options(): Select2Options {\r\n            let opt = super.getSelect2Options();\r\n            opt.createSearchChoice = data => {\r\n                    return { id: data, text: data }\r\n                };\r\n                opt.createSearchChoicePosition = \"bottom\";\r\n            }\r\n            return opt;\r\n        }\r\n```\r\nand ,yes , it works, I can set value not in the lookup list and save it correctly.\r\nbut there is still a little pity that when I open the dialog again, the saved value does not show correctly.\r\nas I know nothing about select2 before, I can't figure it out yet, can you give me some advice?\r\n\r\nBTW, I try to overload Select2Editor.getCreateSearchChoice function before, \r\n```\r\ngetCreateSearchChoice(getName?: (p1: any) => string): (p1: string) => any {\r\n            return data => {\r\n                 return { id: data, text: data }\r\n            };\r\n        }\r\n```\r\nit doesn't work at all, I don't know why."}}
{"actor":{"display_login":"tky753"}}