{"action":"opened","issue":{"url":"https://api.github.com/repos/palantir/plottable/issues/2877","labels_url":"https://api.github.com/repos/palantir/plottable/issues/2877/labels{/name}","comments_url":"https://api.github.com/repos/palantir/plottable/issues/2877/comments","events_url":"https://api.github.com/repos/palantir/plottable/issues/2877/events","html_url":"https://github.com/palantir/plottable/issues/2877","id":111278262,"number":2877,"title":"Interaction.enabledIf(() => boolean)","user":{"login":"thelastnode","id":250437,"avatar_url":"https://avatars.githubusercontent.com/u/250437?v=3","gravatar_id":"","url":"https://api.github.com/users/thelastnode","html_url":"https://github.com/thelastnode","followers_url":"https://api.github.com/users/thelastnode/followers","following_url":"https://api.github.com/users/thelastnode/following{/other_user}","gists_url":"https://api.github.com/users/thelastnode/gists{/gist_id}","starred_url":"https://api.github.com/users/thelastnode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thelastnode/subscriptions","organizations_url":"https://api.github.com/users/thelastnode/orgs","repos_url":"https://api.github.com/users/thelastnode/repos","events_url":"https://api.github.com/users/thelastnode/events{/privacy}","received_events_url":"https://api.github.com/users/thelastnode/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/palantir/plottable/labels/Feature%20Request","name":"Feature Request","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-13T21:46:12Z","updated_at":"2015-10-13T21:46:12Z","closed_at":null,"body":"It would be great to be able to conditionally enable an interaction based on a callback, especially for interoperating with frameworks like React.\r\n\r\nExample:\r\n\r\n    const dragLayer = new Plottable.Components.XDragBoxLayer()\r\n        .onDragEnd((bounds: Plottable.Bounds) => { /* ... */ })\r\n        .enabledIf(() => this.props.dragIsEnabled)"}}