{"action":"created","issue":{"url":"https://api.github.com/repos/SharePoint/PnP-JS-Core/issues/740","repository_url":"https://api.github.com/repos/SharePoint/PnP-JS-Core","labels_url":"https://api.github.com/repos/SharePoint/PnP-JS-Core/issues/740/labels{/name}","comments_url":"https://api.github.com/repos/SharePoint/PnP-JS-Core/issues/740/comments","events_url":"https://api.github.com/repos/SharePoint/PnP-JS-Core/issues/740/events","html_url":"https://github.com/SharePoint/PnP-JS-Core/issues/740","id":300689718,"number":740,"title":"Add custom client side webpart in modern page ?","user":{"login":"veeramanx","id":36476607,"avatar_url":"https://avatars1.githubusercontent.com/u/36476607?v=4","gravatar_id":"","url":"https://api.github.com/users/veeramanx","html_url":"https://github.com/veeramanx","followers_url":"https://api.github.com/users/veeramanx/followers","following_url":"https://api.github.com/users/veeramanx/following{/other_user}","gists_url":"https://api.github.com/users/veeramanx/gists{/gist_id}","starred_url":"https://api.github.com/users/veeramanx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/veeramanx/subscriptions","organizations_url":"https://api.github.com/users/veeramanx/orgs","repos_url":"https://api.github.com/users/veeramanx/repos","events_url":"https://api.github.com/users/veeramanx/events{/privacy}","received_events_url":"https://api.github.com/users/veeramanx/received_events","type":"User","site_admin":false},"labels":[{"id":571333073,"url":"https://api.github.com/repos/SharePoint/PnP-JS-Core/labels/Fixed%20/%20Answered","name":"Fixed / Answered","color":"0e8a16","default":false},{"id":336234984,"url":"https://api.github.com/repos/SharePoint/PnP-JS-Core/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-02-27T16:01:02Z","updated_at":"2018-03-08T20:59:35Z","closed_at":null,"author_association":"NONE","body":"Thank you for reporting an issue, suggesting an enhancement, or asking a question. We appreciate your feedback - to help the team understand your\r\nneeds please complete the below template to ensure we have the details to help. Thanks!\r\n\r\n**Please check out the [Developer Guide](https://github.com/SharePoint/PnP-JS-Core/wiki/Developer-Guide) to see if your question is already addressed there. This will help us ensure our documentation covers the most frequent questions.**\r\n\r\n#### Category\r\n[ ] Enhancement\r\n\r\n[ ] Bug\r\n\r\n[ ] Question\r\n\r\n#### Version\r\n\r\nPlease specify what version of the library you are using: [         ]\r\n\r\n_If you are not using the latest release, please update and see if the issue is resolved before submitting an issue._\r\n\r\n#### Expected / Desired Behavior / Question\r\nHi, can you also let me know how to add custom client side web part to modern page ? i have done the following parts like getting webpart using ID and addcontrol but it is still not appearing in modern page. \r\n\r\n    const page = await ClientSidePage.fromFile(pnp.sp.web.getFileByServerRelativeUrl(`${siteurls}`));\r\n    const partDefs = await pnp.sp.web.getClientSideWebParts();\r\n    const part = ClientSideWebpart.fromComponentDef(partDefs.filter(c => c.Id === \"{5A7081CE-4372-4F7C-A480-13B072326977}\")[0]);\r\n    const part1 = ClientSideWebpart.fromComponentDef(partDefs.filter(c => c.Id === \"{863E3FB5-C9B8-46E2-9F40-6D19A59DE3B2}\")[0]);\r\n    const part2 = ClientSideWebpart.fromComponentDef(partDefs.filter(c => c.Id === \"{D155B861-15C2-42FB-ADEA-B8663D0C8E4A}\")[0]);\r\n    const part3 = ClientSideWebpart.fromComponentDef(partDefs.filter(c => c.Id === \"{6FEEF75A-6BD5-4728-86DD-EDCD75381C08}\")[0]);\r\n     \r\n    part.setProperties<ClientSideWebpartData>({\r\n      \"id\": \"{5A7081CE-4372-4F7C-A480-13B072326977}\",\r\n      \"instanceId\": \"dcb78f96-e670-47af-b65f-aebe589d5c9d\",\r\n      \"title\": \"Helloworld2\",\r\n      \"description\": \"Helloworld2 description\",\r\n      \"dataVersion\": \"1.0\",\r\n      \"properties\": {\r\n         \"description\": \"Helloworld2\"\r\n        },\r\n    });\r\n\r\n    part1.setProperties<ClientSideWebpartData>({\r\n      \"id\": \"863e3fb5-c9b8-46e2-9f40-6d19a59de3b2\",\r\n      \"instanceId\": \"ac83484b-d34a-4437-aa6c-eea0d88d80cb\",\r\n      \"title\": \"Helloworld3\",\r\n      \"description\": \"Helloworld3 description\",\r\n      \"dataVersion\": \"1.0\",\r\n      \"properties\": {\r\n      \"description\": \"Helloworld3\"\r\n          }\r\n      })\r\n    page.addSection().addControl(part);\r\n    page.addSection().addControl(part1);\r\n    await page.save\r\n\r\n\r\nplease let me know if i am making any mistake here\r\n#### Observed Behavior\r\n_If you are reporting an issue please describe the behavior you expected to occur when performing the action. If you are making a\r\nsuggestion or asking a question delete this section._\r\n\r\n#### Steps to Reproduce\r\n_If you are reporting an issue please describe the steps to reproduce the bug in sufficient detail to allow testing. If you are making\r\na suggestion or asking a question delete this section._\r\n\r\n#### Submission Guidelines\r\n_Delete this section after reading_\r\n- All suggestions, questions and issues are welcome, please let us know what's on your mind.\r\n- If you have a general question [gitter](https://gitter.im/OfficeDev/PnP-JS-Core) may be a better forum.\r\n- Remember to include sufficient details and context.\r\n- If you have multiple suggestions, questions, or bugs please submit them in seperate issues so we can track resolution.\r\n\r\nThanks!\r\n"},"comment":{"url":"https://api.github.com/repos/SharePoint/PnP-JS-Core/issues/comments/371622504","html_url":"https://github.com/SharePoint/PnP-JS-Core/issues/740#issuecomment-371622504","issue_url":"https://api.github.com/repos/SharePoint/PnP-JS-Core/issues/740","id":371622504,"user":{"login":"patrick-rodgers","id":13154702,"avatar_url":"https://avatars3.githubusercontent.com/u/13154702?v=4","gravatar_id":"","url":"https://api.github.com/users/patrick-rodgers","html_url":"https://github.com/patrick-rodgers","followers_url":"https://api.github.com/users/patrick-rodgers/followers","following_url":"https://api.github.com/users/patrick-rodgers/following{/other_user}","gists_url":"https://api.github.com/users/patrick-rodgers/gists{/gist_id}","starred_url":"https://api.github.com/users/patrick-rodgers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrick-rodgers/subscriptions","organizations_url":"https://api.github.com/users/patrick-rodgers/orgs","repos_url":"https://api.github.com/users/patrick-rodgers/repos","events_url":"https://api.github.com/users/patrick-rodgers/events{/privacy}","received_events_url":"https://api.github.com/users/patrick-rodgers/received_events","type":"User","site_admin":false},"created_at":"2018-03-08T20:59:35Z","updated_at":"2018-03-08T20:59:35Z","author_association":"CONTRIBUTOR","body":"Are you missing the () on `await page.save`? Maybe should be `await page.save()`?"}}
{"actor":{"display_login":"patrick-rodgers"}}