{"action":"created","issue":{"url":"https://api.github.com/repos/d3lm/ngx-drag-to-select/issues/46","repository_url":"https://api.github.com/repos/d3lm/ngx-drag-to-select","labels_url":"https://api.github.com/repos/d3lm/ngx-drag-to-select/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/d3lm/ngx-drag-to-select/issues/46/comments","events_url":"https://api.github.com/repos/d3lm/ngx-drag-to-select/issues/46/events","html_url":"https://github.com/d3lm/ngx-drag-to-select/issues/46","id":359210239,"node_id":"MDU6SXNzdWUzNTkyMTAyMzk=","number":46,"title":"Feature request: add method to toggle selected item","user":{"login":"seranus","id":590231,"node_id":"MDQ6VXNlcjU5MDIzMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/590231?v=4","gravatar_id":"","url":"https://api.github.com/users/seranus","html_url":"https://github.com/seranus","followers_url":"https://api.github.com/users/seranus/followers","following_url":"https://api.github.com/users/seranus/following{/other_user}","gists_url":"https://api.github.com/users/seranus/gists{/gist_id}","starred_url":"https://api.github.com/users/seranus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seranus/subscriptions","organizations_url":"https://api.github.com/users/seranus/orgs","repos_url":"https://api.github.com/users/seranus/repos","events_url":"https://api.github.com/users/seranus/events{/privacy}","received_events_url":"https://api.github.com/users/seranus/received_events","type":"User","site_admin":false},"labels":[{"id":884682761,"node_id":"MDU6TGFiZWw4ODQ2ODI3NjE=","url":"https://api.github.com/repos/d3lm/ngx-drag-to-select/labels/comp:%20lib","name":"comp: lib","color":"d4c5f9","default":false},{"id":886291126,"node_id":"MDU6TGFiZWw4ODYyOTExMjY=","url":"https://api.github.com/repos/d3lm/ngx-drag-to-select/labels/discussion","name":"discussion","color":"ac00c6","default":false},{"id":884701260,"node_id":"MDU6TGFiZWw4ODQ3MDEyNjA=","url":"https://api.github.com/repos/d3lm/ngx-drag-to-select/labels/p4:%20nice%20to%20have","name":"p4: nice to have","color":"fef2c0","default":false},{"id":886484774,"node_id":"MDU6TGFiZWw4ODY0ODQ3NzQ=","url":"https://api.github.com/repos/d3lm/ngx-drag-to-select/labels/type:%20feature","name":"type: feature","color":"eeeeee","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-09-11T20:26:05Z","updated_at":"2018-09-12T09:26:22Z","closed_at":null,"author_association":"NONE","body":"I need to add a specific set of items to selection based on their id. Later I use selected items for drag and drop."},"comment":{"url":"https://api.github.com/repos/d3lm/ngx-drag-to-select/issues/comments/420577430","html_url":"https://github.com/d3lm/ngx-drag-to-select/issues/46#issuecomment-420577430","issue_url":"https://api.github.com/repos/d3lm/ngx-drag-to-select/issues/46","id":420577430,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMDU3NzQzMA==","user":{"login":"timdeschryver","id":28659384,"node_id":"MDQ6VXNlcjI4NjU5Mzg0","avatar_url":"https://avatars1.githubusercontent.com/u/28659384?v=4","gravatar_id":"","url":"https://api.github.com/users/timdeschryver","html_url":"https://github.com/timdeschryver","followers_url":"https://api.github.com/users/timdeschryver/followers","following_url":"https://api.github.com/users/timdeschryver/following{/other_user}","gists_url":"https://api.github.com/users/timdeschryver/gists{/gist_id}","starred_url":"https://api.github.com/users/timdeschryver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timdeschryver/subscriptions","organizations_url":"https://api.github.com/users/timdeschryver/orgs","repos_url":"https://api.github.com/users/timdeschryver/repos","events_url":"https://api.github.com/users/timdeschryver/events{/privacy}","received_events_url":"https://api.github.com/users/timdeschryver/received_events","type":"User","site_admin":false},"created_at":"2018-09-12T09:26:22Z","updated_at":"2018-09-12T09:26:22Z","author_association":"CONTRIBUTOR","body":"Would this mean that user has to work with `SelectItemDirective`?\r\n\r\nInternally we'll have to but, what about something like the following:\r\n\r\n```ts\r\n// predicate to select items, internally we'll have to loop over all items and use `getValue()` to get the item's value and then we can use the predicate to filter out items\r\ncontainer.select(item => item.id === 5)\r\n\r\n// another way would be to pass id's, and a id selector\r\ncontainer.select([5, 6, 9], item => item.id)\r\n```"}}
{"actor":{"display_login":"timdeschryver"}}