{"action":"created","issue":{"url":"https://api.github.com/repos/vaadin/vaadin-crud/issues/60","repository_url":"https://api.github.com/repos/vaadin/vaadin-crud","labels_url":"https://api.github.com/repos/vaadin/vaadin-crud/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/vaadin/vaadin-crud/issues/60/comments","events_url":"https://api.github.com/repos/vaadin/vaadin-crud/issues/60/events","html_url":"https://github.com/vaadin/vaadin-crud/issues/60","id":363125372,"node_id":"MDU6SXNzdWUzNjMxMjUzNzI=","number":60,"title":"When creating a new item, scroll to its position","user":{"login":"manolo","id":161853,"node_id":"MDQ6VXNlcjE2MTg1Mw==","avatar_url":"https://avatars1.githubusercontent.com/u/161853?v=4","gravatar_id":"","url":"https://api.github.com/users/manolo","html_url":"https://github.com/manolo","followers_url":"https://api.github.com/users/manolo/followers","following_url":"https://api.github.com/users/manolo/following{/other_user}","gists_url":"https://api.github.com/users/manolo/gists{/gist_id}","starred_url":"https://api.github.com/users/manolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manolo/subscriptions","organizations_url":"https://api.github.com/users/manolo/orgs","repos_url":"https://api.github.com/users/manolo/repos","events_url":"https://api.github.com/users/manolo/events{/privacy}","received_events_url":"https://api.github.com/users/manolo/received_events","type":"User","site_admin":false},"labels":[{"id":1034315701,"node_id":"MDU6TGFiZWwxMDM0MzE1NzAx","url":"https://api.github.com/repos/vaadin/vaadin-crud/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"state":"open","locked":false,"assignee":{"login":"manolo","id":161853,"node_id":"MDQ6VXNlcjE2MTg1Mw==","avatar_url":"https://avatars1.githubusercontent.com/u/161853?v=4","gravatar_id":"","url":"https://api.github.com/users/manolo","html_url":"https://github.com/manolo","followers_url":"https://api.github.com/users/manolo/followers","following_url":"https://api.github.com/users/manolo/following{/other_user}","gists_url":"https://api.github.com/users/manolo/gists{/gist_id}","starred_url":"https://api.github.com/users/manolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manolo/subscriptions","organizations_url":"https://api.github.com/users/manolo/orgs","repos_url":"https://api.github.com/users/manolo/repos","events_url":"https://api.github.com/users/manolo/events{/privacy}","received_events_url":"https://api.github.com/users/manolo/received_events","type":"User","site_admin":false},"assignees":[{"login":"manolo","id":161853,"node_id":"MDQ6VXNlcjE2MTg1Mw==","avatar_url":"https://avatars1.githubusercontent.com/u/161853?v=4","gravatar_id":"","url":"https://api.github.com/users/manolo","html_url":"https://github.com/manolo","followers_url":"https://api.github.com/users/manolo/followers","following_url":"https://api.github.com/users/manolo/following{/other_user}","gists_url":"https://api.github.com/users/manolo/gists{/gist_id}","starred_url":"https://api.github.com/users/manolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manolo/subscriptions","organizations_url":"https://api.github.com/users/manolo/orgs","repos_url":"https://api.github.com/users/manolo/repos","events_url":"https://api.github.com/users/manolo/events{/privacy}","received_events_url":"https://api.github.com/users/manolo/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-09-24T12:30:48Z","updated_at":"2018-10-26T08:34:16Z","closed_at":null,"author_association":"MEMBER","body":"Suggested by @jouni "},"comment":{"url":"https://api.github.com/repos/vaadin/vaadin-crud/issues/comments/433331741","html_url":"https://github.com/vaadin/vaadin-crud/issues/60#issuecomment-433331741","issue_url":"https://api.github.com/repos/vaadin/vaadin-crud/issues/60","id":433331741,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzMzMTc0MQ==","user":{"login":"manolo","id":161853,"node_id":"MDQ6VXNlcjE2MTg1Mw==","avatar_url":"https://avatars1.githubusercontent.com/u/161853?v=4","gravatar_id":"","url":"https://api.github.com/users/manolo","html_url":"https://github.com/manolo","followers_url":"https://api.github.com/users/manolo/followers","following_url":"https://api.github.com/users/manolo/following{/other_user}","gists_url":"https://api.github.com/users/manolo/gists{/gist_id}","starred_url":"https://api.github.com/users/manolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manolo/subscriptions","organizations_url":"https://api.github.com/users/manolo/orgs","repos_url":"https://api.github.com/users/manolo/repos","events_url":"https://api.github.com/users/manolo/events{/privacy}","received_events_url":"https://api.github.com/users/manolo/received_events","type":"User","site_admin":false},"created_at":"2018-10-26T08:34:16Z","updated_at":"2018-10-26T08:34:16Z","author_association":"MEMBER","body":"There are several issues to handle this\r\n\r\n- `scrollToIndex` is marked as private, hence we need to use `_scrollToIndex` which is protected\r\n- Crud component only can compute the index of the item to pass as parameter to `_scrollToIndex` in the case of items, but not for dataProvider.\r\n- Filters and sorters make imposible to scroll to the item given it's index, hence we need to reset those before scrolling\r\n- Reset filters and sorters requires transvers the DOM to find helpers and set value and direction properties. When we have custom text-fields in filter helpers, it makes more difficult to handle it.\r\n- When user has a custom grid, we can not rely that he is using helpers for sort/filter or a custom approach\r\n\r\nTherefore, there is no a crud out-of-the-box solution covering all usecases. It means that user needs to handle it in their app.\r\n\r\nI have created a [branch](https://github.com/vaadin/vaadin-crud/compare/fix/60?expand=1) demonstrating how to reset filters and sorters and move the scroll. It is using protected API and needs a change in crud-grid implementation, so probably it's not a good idea to merge it wdy @jouni @alvarezguille  "}}
{"actor":{"display_login":"manolo"}}