{"action":"created","issue":{"url":"https://api.github.com/repos/aurelia-toolbelt/aurelia-toolbelt/issues/59","repository_url":"https://api.github.com/repos/aurelia-toolbelt/aurelia-toolbelt","labels_url":"https://api.github.com/repos/aurelia-toolbelt/aurelia-toolbelt/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/aurelia-toolbelt/aurelia-toolbelt/issues/59/comments","events_url":"https://api.github.com/repos/aurelia-toolbelt/aurelia-toolbelt/issues/59/events","html_url":"https://github.com/aurelia-toolbelt/aurelia-toolbelt/issues/59","id":358327958,"node_id":"MDU6SXNzdWUzNTgzMjc5NTg=","number":59,"title":"Modal would be more useful with a `dismiss` method that accept a reason of type any","user":{"login":"ghiscoding","id":643976,"node_id":"MDQ6VXNlcjY0Mzk3Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/643976?v=4","gravatar_id":"","url":"https://api.github.com/users/ghiscoding","html_url":"https://github.com/ghiscoding","followers_url":"https://api.github.com/users/ghiscoding/followers","following_url":"https://api.github.com/users/ghiscoding/following{/other_user}","gists_url":"https://api.github.com/users/ghiscoding/gists{/gist_id}","starred_url":"https://api.github.com/users/ghiscoding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghiscoding/subscriptions","organizations_url":"https://api.github.com/users/ghiscoding/orgs","repos_url":"https://api.github.com/users/ghiscoding/repos","events_url":"https://api.github.com/users/ghiscoding/events{/privacy}","received_events_url":"https://api.github.com/users/ghiscoding/received_events","type":"User","site_admin":false},"labels":[{"id":741020642,"node_id":"MDU6TGFiZWw3NDEwMjA2NDI=","url":"https://api.github.com/repos/aurelia-toolbelt/aurelia-toolbelt/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":1052644099,"node_id":"MDU6TGFiZWwxMDUyNjQ0MDk5","url":"https://api.github.com/repos/aurelia-toolbelt/aurelia-toolbelt/labels/proposal","name":"proposal","color":"1d76db","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2018-09-08T21:06:24Z","updated_at":"2018-10-09T03:48:24Z","closed_at":"2018-09-14T11:14:57Z","author_association":"NONE","body":"Started using your great library and it's working great, however it would be even better if the Modal Component could have a `dismiss(reason: any)` (or close) method. As for example, I am working on a modal window that has a form and I need to be able to use the form data into the parent. For a better example, let say we have a user which create an item and once the item is saved, we close the modal window and we use the object returned by the server to refresh the grid (without refreshing the entire grid, we just add that 1 object to the grid via typescript). \r\n\r\nI'm not totally sure on how to implement in your component but if we look at [ng-bootstrap](https://ng-bootstrap.github.io/#/components/modal/examples), they have the [dismiss](https://github.com/ng-bootstrap/ng-bootstrap/blob/master/src/modal/modal-ref.ts#L76) method. In their example, click on \"Launch demo modal\" and then click on the \"Save\" button and you will see the text \"Closed with: Save click\" appearing on the parent window via the `dismiss(reason: any)` method.\r\n\r\nCurrently your Modal Component can only be closed via the View, I don't see how to close the modal window in ViewModel (.ts) code.\r\n\r\nFor now, I guess I could do the same via an Event Aggregator, something like `this.ea.publish('onItemCreated', this.item);`, but that would be great if the Modal Component support the `dismiss(reason: any)` method internally."},"comment":{"url":"https://api.github.com/repos/aurelia-toolbelt/aurelia-toolbelt/issues/comments/428050242","html_url":"https://github.com/aurelia-toolbelt/aurelia-toolbelt/issues/59#issuecomment-428050242","issue_url":"https://api.github.com/repos/aurelia-toolbelt/aurelia-toolbelt/issues/59","id":428050242,"node_id":"MDEyOklzc3VlQ29tbWVudDQyODA1MDI0Mg==","user":{"login":"ghiscoding","id":643976,"node_id":"MDQ6VXNlcjY0Mzk3Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/643976?v=4","gravatar_id":"","url":"https://api.github.com/users/ghiscoding","html_url":"https://github.com/ghiscoding","followers_url":"https://api.github.com/users/ghiscoding/followers","following_url":"https://api.github.com/users/ghiscoding/following{/other_user}","gists_url":"https://api.github.com/users/ghiscoding/gists{/gist_id}","starred_url":"https://api.github.com/users/ghiscoding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghiscoding/subscriptions","organizations_url":"https://api.github.com/users/ghiscoding/orgs","repos_url":"https://api.github.com/users/ghiscoding/repos","events_url":"https://api.github.com/users/ghiscoding/events{/privacy}","received_events_url":"https://api.github.com/users/ghiscoding/received_events","type":"User","site_admin":false},"created_at":"2018-10-09T03:48:24Z","updated_at":"2018-10-09T03:48:24Z","author_association":"NONE","body":"@shahabganji \r\nI finally got the `aurelia-dialog` working with WebPack 4, I literally passed few days on this and of course it was 1 simple line of code to be the problem. \r\n\r\nSo I got the Prompt `aurelia-dialog` sample working and it's all good, except when I try to add your Modal demo mixed with Aurelia-Dialog, that doesn't seem to work properly. It seems that something happens (a hidden modal). Would you mind taking a look at the fork of your starter kit, I made a fork and simply try adding the modal sample into it (it also has the Prompt like I said earlier). The fork is available at this [link](https://github.com/ghiscoding/aut-webpack4-starter-kit).\r\n\r\nSee below for a demo, when I click \"Add Developper\", it looks like it's a hidden (or white) modal dialog, I cannot click on the button in the back and I have to click \"ESC\" on my keyboard to get the rest of the window working again.\r\n\r\n![2018-10-08_23-46-07](https://user-images.githubusercontent.com/643976/46645742-60693880-cb54-11e8-8620-5cfd90346821.gif)\r\n"}}
{"actor":{"display_login":"ghiscoding"}}