{"action":"closed","issue":{"url":"https://api.github.com/repos/Shopify/polaris/issues/378","repository_url":"https://api.github.com/repos/Shopify/polaris","labels_url":"https://api.github.com/repos/Shopify/polaris/issues/378/labels{/name}","comments_url":"https://api.github.com/repos/Shopify/polaris/issues/378/comments","events_url":"https://api.github.com/repos/Shopify/polaris/issues/378/events","html_url":"https://github.com/Shopify/polaris/issues/378","id":342574687,"node_id":"MDU6SXNzdWUzNDI1NzQ2ODc=","number":378,"title":"Embedded alert: state change causes the infinite recursion","user":{"login":"superwhykz","id":19716620,"node_id":"MDQ6VXNlcjE5NzE2NjIw","avatar_url":"https://avatars2.githubusercontent.com/u/19716620?v=4","gravatar_id":"","url":"https://api.github.com/users/superwhykz","html_url":"https://github.com/superwhykz","followers_url":"https://api.github.com/users/superwhykz/followers","following_url":"https://api.github.com/users/superwhykz/following{/other_user}","gists_url":"https://api.github.com/users/superwhykz/gists{/gist_id}","starred_url":"https://api.github.com/users/superwhykz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superwhykz/subscriptions","organizations_url":"https://api.github.com/users/superwhykz/orgs","repos_url":"https://api.github.com/users/superwhykz/repos","events_url":"https://api.github.com/users/superwhykz/events{/privacy}","received_events_url":"https://api.github.com/users/superwhykz/received_events","type":"User","site_admin":false},"labels":[{"id":588288143,"node_id":"MDU6TGFiZWw1ODgyODgxNDM=","url":"https://api.github.com/repos/Shopify/polaris/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-07-19T04:25:59Z","updated_at":"2018-07-19T16:55:03Z","closed_at":"2018-07-19T16:55:03Z","author_association":"NONE","body":"# Issue summary\r\nI am not sure what is happening but it seems on the `state` change causes the infinite recursion. \r\n\r\n## Expected behavior\r\nThe embedded alert should pop up. \r\n\r\n## Actual behavior\r\n<img width=\"313\" alt=\"modal_issue\" src=\"https://user-images.githubusercontent.com/19716620/42921158-5815e39c-8ae8-11e8-8457-9ca9581e7be1.png\">\r\n\r\n\r\n## Steps to reproduce the problem\r\n\r\nFrom `Page` component\r\n\r\n```\r\nhandleCreateChange() {\r\n    switch (this.props.tab) {\r\n      case 0:\r\n        if (this.props.list.length === 1) {\r\n          this.props.setDisableCreate(true);\r\n  ...\r\n  ...\r\n  ...\r\n}\r\n\r\n...\r\n...\r\n...\r\n\r\n     },\r\n        ]}\r\n        primaryAction={{\r\n          content: 'Create Rule',\r\n          onAction: () => this.handleCreateChange(),\r\n        }}\r\n      >\r\n        <Alert\r\n          title=\"Reached limit\"\r\n          open={\r\n            this.props.disableCreate &&\r\n            !this.props.isFetching\r\n          }\r\n          confirmContent=\"Close\"\r\n          onConfirm={() => this.handleCreateChange()}\r\n        >\r\n          <TextContainer>\r\n            <p>\r\n              You can only modify existing set of rules!\r\n            </p>\r\n          </TextContainer>\r\n        </Alert>\r\n\r\n```\r\n\r\n## Specifications\r\n- Are you using the React components? (Y/N): Yes\r\n- Polaris version number: 2.4.0\r\n- Browser: Chrome Version 67.0.3396.99 (Official Build) (64-bit)\r\n- Device: MacPro\r\n- Operating System: MacOS Sierra 10.12.6\r\n"}}
{"actor":{"display_login":"dleroux"}}