{"action":"created","comment":{"url":"https://api.github.com/repos/milojs/milo-ui/pulls/comments/189848772","pull_request_review_id":122101129,"id":189848772,"diff_hunk":"@@ -0,0 +1,98 @@\n+'use strict';\n+\n+const componentsRegistry = milo.registry.components;\n+const FORM_LIST_CHANGE_MESSAGE = 'formlistchange';\n+\n+module.exports = milo.createComponentClass({\n+    className: 'MLFormListItem',\n+    facets: {\n+        container: undefined,\n+        data: {\n+            get: MLFormListItem_get,\n+            set: MLFormListItem_set,\n+            del: MLFormListItem_del,\n+            event: FORM_LIST_CHANGE_MESSAGE\n+        },\n+        item: undefined,\n+        template: {\n+            template: '\\\n+                <label class=\"form-item-label\">ITEM</label>\\\n+                <span class=\"form-list-controls\">\\\n+                    <span class=\"control-movable\" style=\"display: none\">\\\n+                        <i ml-bind=\"[events]:downBtn\" class=\"fa fa-arrow-down\"></i>\\\n+                        <i ml-bind=\"[events]:upBtn\" class=\"fa fa-arrow-up\"></i>\\\n+                    </span>\\\n+                    <i ml-bind=\"[events]:deleteBtn\" class=\"fa fa-times control-deletable\" style=\"display: none\"></i>\\\n+                </span>\\\n+            ',\n+            interpolate: false,\n+            autoRender: true\n+        },\n+        dom: {\n+            cls: 'form-list-item'\n+        },\n+    },\n+    methods: {\n+        setupSubformOnce: MLFormListItem$setupSubformOnce,\n+        renderSubform: MLFormListItem$renderSubform\n+    }\n+});\n+\n+function MLFormListItem_get() {\n+    var value = this._form && this._form.model.get();\n+    return (value && typeof value === 'object') ? _.clone(value) : value;\n+}\n+\n+function MLFormListItem_set(value) {\n+    this.setupSubformOnce();\n+    this._form.model.set(value);\n+}\n+\n+function MLFormListItem_del() {\n+    this.setupSubformOnce();\n+\n+    this._form && this._form.model.del();\n+}\n+\n+function MLFormListItem$setupSubformOnce() {\n+    if (this._form || this.name === 'itemSample') return;\n+\n+    const schema = getFormList(this)._subFormSchema;\n+    this._form = this.renderSubform(schema);\n+    this._form.model.on('***', { subscriber: function () {\n+        this.data.dispatchSourceMessage(FORM_LIST_CHANGE_MESSAGE);\n+    }, context: this });\n+}\n+\n+function MLFormListItem$renderSubform(schema) {\n+    const MLForm = componentsRegistry.get('MLForm');\n+    const formHost = getFormHost(this);\n+    const oldDomCls = MLForm.getFacetConfig('dom').cls;\n+    const formlist = getFormList(this);\n+\n+    MLForm.getFacetConfig('dom').cls = '';\n+    const newForm = MLForm.createForm(schema, formHost);\n+    MLForm.getFacetConfig('dom').cls = oldDomCls;","path":"lib/components/FormListItem.js","position":75,"original_position":75,"commit_id":"fb27f7bac9d11b2f6295907285a100ff1277a3ca","original_commit_id":"fb27f7bac9d11b2f6295907285a100ff1277a3ca","user":{"login":"Richard-Walton","id":481427,"avatar_url":"https://avatars3.githubusercontent.com/u/481427?v=4","gravatar_id":"","url":"https://api.github.com/users/Richard-Walton","html_url":"https://github.com/Richard-Walton","followers_url":"https://api.github.com/users/Richard-Walton/followers","following_url":"https://api.github.com/users/Richard-Walton/following{/other_user}","gists_url":"https://api.github.com/users/Richard-Walton/gists{/gist_id}","starred_url":"https://api.github.com/users/Richard-Walton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Richard-Walton/subscriptions","organizations_url":"https://api.github.com/users/Richard-Walton/orgs","repos_url":"https://api.github.com/users/Richard-Walton/repos","events_url":"https://api.github.com/users/Richard-Walton/events{/privacy}","received_events_url":"https://api.github.com/users/Richard-Walton/received_events","type":"User","site_admin":false},"body":"Lol @ needing to fight this.  I take it, you couldn't do `newForm.el.style.class = ''` or similar?","created_at":"2018-05-22T10:17:44Z","updated_at":"2018-05-22T10:20:11Z","html_url":"https://github.com/milojs/milo-ui/pull/92#discussion_r189848772","pull_request_url":"https://api.github.com/repos/milojs/milo-ui/pulls/92","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/milojs/milo-ui/pulls/comments/189848772"},"html":{"href":"https://github.com/milojs/milo-ui/pull/92#discussion_r189848772"},"pull_request":{"href":"https://api.github.com/repos/milojs/milo-ui/pulls/92"}}},"pull_request":{"url":"https://api.github.com/repos/milojs/milo-ui/pulls/92","id":187887188,"html_url":"https://github.com/milojs/milo-ui/pull/92","diff_url":"https://github.com/milojs/milo-ui/pull/92.diff","patch_url":"https://github.com/milojs/milo-ui/pull/92.patch","issue_url":"https://api.github.com/repos/milojs/milo-ui/issues/92","number":92,"state":"open","locked":false,"title":" fix: Handle data better in MLFormList component","user":{"login":"maael","id":5610674,"avatar_url":"https://avatars3.githubusercontent.com/u/5610674?v=4","gravatar_id":"","url":"https://api.github.com/users/maael","html_url":"https://github.com/maael","followers_url":"https://api.github.com/users/maael/followers","following_url":"https://api.github.com/users/maael/following{/other_user}","gists_url":"https://api.github.com/users/maael/gists{/gist_id}","starred_url":"https://api.github.com/users/maael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maael/subscriptions","organizations_url":"https://api.github.com/users/maael/orgs","repos_url":"https://api.github.com/users/maael/repos","events_url":"https://api.github.com/users/maael/events{/privacy}","received_events_url":"https://api.github.com/users/maael/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-14T16:45:35Z","updated_at":"2018-05-22T10:20:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ca8370aa63f43c373c259fc7dd1b57ea95d3f271","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/milojs/milo-ui/pulls/92/commits","review_comments_url":"https://api.github.com/repos/milojs/milo-ui/pulls/92/comments","review_comment_url":"https://api.github.com/repos/milojs/milo-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/milojs/milo-ui/issues/92/comments","statuses_url":"https://api.github.com/repos/milojs/milo-ui/statuses/fb27f7bac9d11b2f6295907285a100ff1277a3ca","head":{"label":"milojs:feat/mol-14928-formlist-xp","ref":"feat/mol-14928-formlist-xp","sha":"fb27f7bac9d11b2f6295907285a100ff1277a3ca","user":{"login":"milojs","id":9309402,"avatar_url":"https://avatars1.githubusercontent.com/u/9309402?v=4","gravatar_id":"","url":"https://api.github.com/users/milojs","html_url":"https://github.com/milojs","followers_url":"https://api.github.com/users/milojs/followers","following_url":"https://api.github.com/users/milojs/following{/other_user}","gists_url":"https://api.github.com/users/milojs/gists{/gist_id}","starred_url":"https://api.github.com/users/milojs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milojs/subscriptions","organizations_url":"https://api.github.com/users/milojs/orgs","repos_url":"https://api.github.com/users/milojs/repos","events_url":"https://api.github.com/users/milojs/events{/privacy}","received_events_url":"https://api.github.com/users/milojs/received_events","type":"Organization","site_admin":false},"repo":{"id":41046346,"name":"milo-ui","full_name":"milojs/milo-ui","owner":{"login":"milojs","id":9309402,"avatar_url":"https://avatars1.githubusercontent.com/u/9309402?v=4","gravatar_id":"","url":"https://api.github.com/users/milojs","html_url":"https://github.com/milojs","followers_url":"https://api.github.com/users/milojs/followers","following_url":"https://api.github.com/users/milojs/following{/other_user}","gists_url":"https://api.github.com/users/milojs/gists{/gist_id}","starred_url":"https://api.github.com/users/milojs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milojs/subscriptions","organizations_url":"https://api.github.com/users/milojs/orgs","repos_url":"https://api.github.com/users/milojs/repos","events_url":"https://api.github.com/users/milojs/events{/privacy}","received_events_url":"https://api.github.com/users/milojs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/milojs/milo-ui","description":"milo UI components and schema-based form generator","fork":false,"url":"https://api.github.com/repos/milojs/milo-ui","forks_url":"https://api.github.com/repos/milojs/milo-ui/forks","keys_url":"https://api.github.com/repos/milojs/milo-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/milojs/milo-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/milojs/milo-ui/teams","hooks_url":"https://api.github.com/repos/milojs/milo-ui/hooks","issue_events_url":"https://api.github.com/repos/milojs/milo-ui/issues/events{/number}","events_url":"https://api.github.com/repos/milojs/milo-ui/events","assignees_url":"https://api.github.com/repos/milojs/milo-ui/assignees{/user}","branches_url":"https://api.github.com/repos/milojs/milo-ui/branches{/branch}","tags_url":"https://api.github.com/repos/milojs/milo-ui/tags","blobs_url":"https://api.github.com/repos/milojs/milo-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/milojs/milo-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/milojs/milo-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/milojs/milo-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/milojs/milo-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/milojs/milo-ui/languages","stargazers_url":"https://api.github.com/repos/milojs/milo-ui/stargazers","contributors_url":"https://api.github.com/repos/milojs/milo-ui/contributors","subscribers_url":"https://api.github.com/repos/milojs/milo-ui/subscribers","subscription_url":"https://api.github.com/repos/milojs/milo-ui/subscription","commits_url":"https://api.github.com/repos/milojs/milo-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/milojs/milo-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/milojs/milo-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/milojs/milo-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/milojs/milo-ui/contents/{+path}","compare_url":"https://api.github.com/repos/milojs/milo-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/milojs/milo-ui/merges","archive_url":"https://api.github.com/repos/milojs/milo-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/milojs/milo-ui/downloads","issues_url":"https://api.github.com/repos/milojs/milo-ui/issues{/number}","pulls_url":"https://api.github.com/repos/milojs/milo-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/milojs/milo-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/milojs/milo-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/milojs/milo-ui/labels{/name}","releases_url":"https://api.github.com/repos/milojs/milo-ui/releases{/id}","deployments_url":"https://api.github.com/repos/milojs/milo-ui/deployments","created_at":"2015-08-19T16:34:39Z","updated_at":"2018-05-09T09:08:51Z","pushed_at":"2018-05-21T15:47:42Z","git_url":"git://github.com/milojs/milo-ui.git","ssh_url":"git@github.com:milojs/milo-ui.git","clone_url":"https://github.com/milojs/milo-ui.git","svn_url":"https://github.com/milojs/milo-ui","homepage":null,"size":12319,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":43,"license":null,"forks":0,"open_issues":43,"watchers":3,"default_branch":"master"}},"base":{"label":"milojs:master","ref":"master","sha":"708d7dcbb16037d85928189a32c4485be0f791db","user":{"login":"milojs","id":9309402,"avatar_url":"https://avatars1.githubusercontent.com/u/9309402?v=4","gravatar_id":"","url":"https://api.github.com/users/milojs","html_url":"https://github.com/milojs","followers_url":"https://api.github.com/users/milojs/followers","following_url":"https://api.github.com/users/milojs/following{/other_user}","gists_url":"https://api.github.com/users/milojs/gists{/gist_id}","starred_url":"https://api.github.com/users/milojs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milojs/subscriptions","organizations_url":"https://api.github.com/users/milojs/orgs","repos_url":"https://api.github.com/users/milojs/repos","events_url":"https://api.github.com/users/milojs/events{/privacy}","received_events_url":"https://api.github.com/users/milojs/received_events","type":"Organization","site_admin":false},"repo":{"id":41046346,"name":"milo-ui","full_name":"milojs/milo-ui","owner":{"login":"milojs","id":9309402,"avatar_url":"https://avatars1.githubusercontent.com/u/9309402?v=4","gravatar_id":"","url":"https://api.github.com/users/milojs","html_url":"https://github.com/milojs","followers_url":"https://api.github.com/users/milojs/followers","following_url":"https://api.github.com/users/milojs/following{/other_user}","gists_url":"https://api.github.com/users/milojs/gists{/gist_id}","starred_url":"https://api.github.com/users/milojs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milojs/subscriptions","organizations_url":"https://api.github.com/users/milojs/orgs","repos_url":"https://api.github.com/users/milojs/repos","events_url":"https://api.github.com/users/milojs/events{/privacy}","received_events_url":"https://api.github.com/users/milojs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/milojs/milo-ui","description":"milo UI components and schema-based form generator","fork":false,"url":"https://api.github.com/repos/milojs/milo-ui","forks_url":"https://api.github.com/repos/milojs/milo-ui/forks","keys_url":"https://api.github.com/repos/milojs/milo-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/milojs/milo-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/milojs/milo-ui/teams","hooks_url":"https://api.github.com/repos/milojs/milo-ui/hooks","issue_events_url":"https://api.github.com/repos/milojs/milo-ui/issues/events{/number}","events_url":"https://api.github.com/repos/milojs/milo-ui/events","assignees_url":"https://api.github.com/repos/milojs/milo-ui/assignees{/user}","branches_url":"https://api.github.com/repos/milojs/milo-ui/branches{/branch}","tags_url":"https://api.github.com/repos/milojs/milo-ui/tags","blobs_url":"https://api.github.com/repos/milojs/milo-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/milojs/milo-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/milojs/milo-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/milojs/milo-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/milojs/milo-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/milojs/milo-ui/languages","stargazers_url":"https://api.github.com/repos/milojs/milo-ui/stargazers","contributors_url":"https://api.github.com/repos/milojs/milo-ui/contributors","subscribers_url":"https://api.github.com/repos/milojs/milo-ui/subscribers","subscription_url":"https://api.github.com/repos/milojs/milo-ui/subscription","commits_url":"https://api.github.com/repos/milojs/milo-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/milojs/milo-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/milojs/milo-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/milojs/milo-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/milojs/milo-ui/contents/{+path}","compare_url":"https://api.github.com/repos/milojs/milo-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/milojs/milo-ui/merges","archive_url":"https://api.github.com/repos/milojs/milo-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/milojs/milo-ui/downloads","issues_url":"https://api.github.com/repos/milojs/milo-ui/issues{/number}","pulls_url":"https://api.github.com/repos/milojs/milo-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/milojs/milo-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/milojs/milo-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/milojs/milo-ui/labels{/name}","releases_url":"https://api.github.com/repos/milojs/milo-ui/releases{/id}","deployments_url":"https://api.github.com/repos/milojs/milo-ui/deployments","created_at":"2015-08-19T16:34:39Z","updated_at":"2018-05-09T09:08:51Z","pushed_at":"2018-05-21T15:47:42Z","git_url":"git://github.com/milojs/milo-ui.git","ssh_url":"git@github.com:milojs/milo-ui.git","clone_url":"https://github.com/milojs/milo-ui.git","svn_url":"https://github.com/milojs/milo-ui","homepage":null,"size":12319,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":43,"license":null,"forks":0,"open_issues":43,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/milojs/milo-ui/pulls/92"},"html":{"href":"https://github.com/milojs/milo-ui/pull/92"},"issue":{"href":"https://api.github.com/repos/milojs/milo-ui/issues/92"},"comments":{"href":"https://api.github.com/repos/milojs/milo-ui/issues/92/comments"},"review_comments":{"href":"https://api.github.com/repos/milojs/milo-ui/pulls/92/comments"},"review_comment":{"href":"https://api.github.com/repos/milojs/milo-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/milojs/milo-ui/pulls/92/commits"},"statuses":{"href":"https://api.github.com/repos/milojs/milo-ui/statuses/fb27f7bac9d11b2f6295907285a100ff1277a3ca"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Richard-Walton"}}