{"action":"closed","issue":{"url":"https://api.github.com/repos/marko-js/marko/issues/947","repository_url":"https://api.github.com/repos/marko-js/marko","labels_url":"https://api.github.com/repos/marko-js/marko/issues/947/labels{/name}","comments_url":"https://api.github.com/repos/marko-js/marko/issues/947/comments","events_url":"https://api.github.com/repos/marko-js/marko/issues/947/events","html_url":"https://github.com/marko-js/marko/issues/947","id":281734461,"node_id":"MDU6SXNzdWUyODE3MzQ0NjE=","number":947,"title":"After redraw input component is regenerated with incorrect key. ","user":{"login":"matisskeiris","id":10416839,"node_id":"MDQ6VXNlcjEwNDE2ODM5","avatar_url":"https://avatars1.githubusercontent.com/u/10416839?v=4","gravatar_id":"","url":"https://api.github.com/users/matisskeiris","html_url":"https://github.com/matisskeiris","followers_url":"https://api.github.com/users/matisskeiris/followers","following_url":"https://api.github.com/users/matisskeiris/following{/other_user}","gists_url":"https://api.github.com/users/matisskeiris/gists{/gist_id}","starred_url":"https://api.github.com/users/matisskeiris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matisskeiris/subscriptions","organizations_url":"https://api.github.com/users/matisskeiris/orgs","repos_url":"https://api.github.com/users/matisskeiris/repos","events_url":"https://api.github.com/users/matisskeiris/events{/privacy}","received_events_url":"https://api.github.com/users/matisskeiris/received_events","type":"User","site_admin":false},"labels":[{"id":408934227,"node_id":"MDU6TGFiZWw0MDg5MzQyMjc=","url":"https://api.github.com/repos/marko-js/marko/labels/needs%20more%20info","name":"needs more info","color":"dd9944","default":false},{"id":296638047,"node_id":"MDU6TGFiZWwyOTY2MzgwNDc=","url":"https://api.github.com/repos/marko-js/marko/labels/status:todo","name":"status:todo","color":"5599cc","default":false},{"id":703746215,"node_id":"MDU6TGFiZWw3MDM3NDYyMTU=","url":"https://api.github.com/repos/marko-js/marko/labels/type:unverified%20bug","name":"type:unverified bug","color":"aa3300","default":false}],"state":"closed","locked":false,"assignee":{"login":"DylanPiercey","id":4985201,"node_id":"MDQ6VXNlcjQ5ODUyMDE=","avatar_url":"https://avatars2.githubusercontent.com/u/4985201?v=4","gravatar_id":"","url":"https://api.github.com/users/DylanPiercey","html_url":"https://github.com/DylanPiercey","followers_url":"https://api.github.com/users/DylanPiercey/followers","following_url":"https://api.github.com/users/DylanPiercey/following{/other_user}","gists_url":"https://api.github.com/users/DylanPiercey/gists{/gist_id}","starred_url":"https://api.github.com/users/DylanPiercey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DylanPiercey/subscriptions","organizations_url":"https://api.github.com/users/DylanPiercey/orgs","repos_url":"https://api.github.com/users/DylanPiercey/repos","events_url":"https://api.github.com/users/DylanPiercey/events{/privacy}","received_events_url":"https://api.github.com/users/DylanPiercey/received_events","type":"User","site_admin":false},"assignees":[{"login":"DylanPiercey","id":4985201,"node_id":"MDQ6VXNlcjQ5ODUyMDE=","avatar_url":"https://avatars2.githubusercontent.com/u/4985201?v=4","gravatar_id":"","url":"https://api.github.com/users/DylanPiercey","html_url":"https://github.com/DylanPiercey","followers_url":"https://api.github.com/users/DylanPiercey/followers","following_url":"https://api.github.com/users/DylanPiercey/following{/other_user}","gists_url":"https://api.github.com/users/DylanPiercey/gists{/gist_id}","starred_url":"https://api.github.com/users/DylanPiercey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DylanPiercey/subscriptions","organizations_url":"https://api.github.com/users/DylanPiercey/orgs","repos_url":"https://api.github.com/users/DylanPiercey/repos","events_url":"https://api.github.com/users/DylanPiercey/events{/privacy}","received_events_url":"https://api.github.com/users/DylanPiercey/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2017-12-13T12:36:53Z","updated_at":"2018-07-20T06:31:30Z","closed_at":"2018-07-20T06:31:30Z","author_association":"NONE","body":"## Bug Report\r\nAfter redraw marko regenarates key for component. \r\n\r\n### Marko Version: 4.5.6\r\n\r\n### Details\r\nI have a modal component, that can be shown and hidden. \r\n```\r\n<div class=['modal large-modal', !state.visible && 'hidden' ]>\r\n    <div class=\"modal-background\" onClick(\"handleMaskClick\") />\r\n    <div class=\"exit-button\" />\r\n    <div class=\"modal-container\">\r\n        <div class=\"modal-body\" key=\"body\">\r\n            <include (input.renderBody) />\r\n        </div>\r\n        <div class=\"modal-footer\">\r\n            <include (input.actions) />\r\n        </div>\r\n    </div>\r\n</div>\r\n```\r\nI am using this component to display a timer component\r\n```\r\n<large-modal key=\"popup-window\" on-hide('pauseTimer', 'timer')>\r\n    <@renderBody> \r\n        <timer key=\"timer\" />\r\n    </@renderBody>\r\n</large-modal>\r\n```\r\nThis timer component has a method pause, that would pause the timer after modal is closed. To do that, i have added method on hide event on modal, that looks like this. \r\n```\r\npauseTimer(timerKey) {\r\n    this.getComponent(timerKey).pause();\r\n}\r\n```\r\nThis functionality does not work, as after each manipulation on modal, that is state.visibility changes, the contents are redrawn, including timer key=\"timer\" and marko sets this components id now to timer_1, which makes my functionality with call pauseTimer('timer') to not work, as this component no longer is identified by this key. \r\n\r\n### Expected Behavior\r\nI am expecting key to not change in scenario when component is redrawn. "}}
{"actor":{"display_login":"mlrawlings"}}