{"action":"created","issue":{"url":"https://api.github.com/repos/vaadin/vaadin-grid-flow/issues/383","repository_url":"https://api.github.com/repos/vaadin/vaadin-grid-flow","labels_url":"https://api.github.com/repos/vaadin/vaadin-grid-flow/issues/383/labels{/name}","comments_url":"https://api.github.com/repos/vaadin/vaadin-grid-flow/issues/383/comments","events_url":"https://api.github.com/repos/vaadin/vaadin-grid-flow/issues/383/events","html_url":"https://github.com/vaadin/vaadin-grid-flow/issues/383","id":372896280,"node_id":"MDU6SXNzdWUzNzI4OTYyODA=","number":383,"title":"Issue with dynamic height and data provider","user":{"login":"heruan","id":851745,"node_id":"MDQ6VXNlcjg1MTc0NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/851745?v=4","gravatar_id":"","url":"https://api.github.com/users/heruan","html_url":"https://github.com/heruan","followers_url":"https://api.github.com/users/heruan/followers","following_url":"https://api.github.com/users/heruan/following{/other_user}","gists_url":"https://api.github.com/users/heruan/gists{/gist_id}","starred_url":"https://api.github.com/users/heruan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heruan/subscriptions","organizations_url":"https://api.github.com/users/heruan/orgs","repos_url":"https://api.github.com/users/heruan/repos","events_url":"https://api.github.com/users/heruan/events{/privacy}","received_events_url":"https://api.github.com/users/heruan/received_events","type":"User","site_admin":false},"labels":[{"id":724712376,"node_id":"MDU6TGFiZWw3MjQ3MTIzNzY=","url":"https://api.github.com/repos/vaadin/vaadin-grid-flow/labels/bug","name":"bug","color":"ee0701","default":true},{"id":764249202,"node_id":"MDU6TGFiZWw3NjQyNDkyMDI=","url":"https://api.github.com/repos/vaadin/vaadin-grid-flow/labels/components","name":"components","color":"1d76db","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/vaadin/vaadin-grid-flow/milestones/1","html_url":"https://github.com/vaadin/vaadin-grid-flow/milestone/1","labels_url":"https://api.github.com/repos/vaadin/vaadin-grid-flow/milestones/1/labels","id":2932745,"node_id":"MDk6TWlsZXN0b25lMjkzMjc0NQ==","number":1,"title":"Abandoned","description":"","creator":{"login":"pleku","id":1478381,"node_id":"MDQ6VXNlcjE0NzgzODE=","avatar_url":"https://avatars1.githubusercontent.com/u/1478381?v=4","gravatar_id":"","url":"https://api.github.com/users/pleku","html_url":"https://github.com/pleku","followers_url":"https://api.github.com/users/pleku/followers","following_url":"https://api.github.com/users/pleku/following{/other_user}","gists_url":"https://api.github.com/users/pleku/gists{/gist_id}","starred_url":"https://api.github.com/users/pleku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pleku/subscriptions","organizations_url":"https://api.github.com/users/pleku/orgs","repos_url":"https://api.github.com/users/pleku/repos","events_url":"https://api.github.com/users/pleku/events{/privacy}","received_events_url":"https://api.github.com/users/pleku/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":42,"state":"open","created_at":"2017-11-23T07:36:44Z","updated_at":"2018-10-24T11:46:47Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2018-10-23T09:21:51Z","updated_at":"2018-10-24T11:46:47Z","closed_at":"2018-10-24T11:46:47Z","author_association":"CONTRIBUTOR","body":"I have a grid with `height-by-rows` set via `grid.setHeightByRows(true)` and a data provider. When the page load, the data provider is immediately queried with:\r\n\r\n- offset: 0\r\n- limit: 50\r\n\r\nthen\r\n\r\n- offset: 50\r\n- limit: 100\r\n\r\nthen\r\n\r\n- offset: 150\r\n- limit: 4500\r\n\r\nat which point it hangs.\r\n\r\nAll the three queries happen without any interaction (i.e. no scrolling) after page load."},"comment":{"url":"https://api.github.com/repos/vaadin/vaadin-grid-flow/issues/comments/432623302","html_url":"https://github.com/vaadin/vaadin-grid-flow/issues/383#issuecomment-432623302","issue_url":"https://api.github.com/repos/vaadin/vaadin-grid-flow/issues/383","id":432623302,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjYyMzMwMg==","user":{"login":"Legioth","id":1294657,"node_id":"MDQ6VXNlcjEyOTQ2NTc=","avatar_url":"https://avatars2.githubusercontent.com/u/1294657?v=4","gravatar_id":"","url":"https://api.github.com/users/Legioth","html_url":"https://github.com/Legioth","followers_url":"https://api.github.com/users/Legioth/followers","following_url":"https://api.github.com/users/Legioth/following{/other_user}","gists_url":"https://api.github.com/users/Legioth/gists{/gist_id}","starred_url":"https://api.github.com/users/Legioth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Legioth/subscriptions","organizations_url":"https://api.github.com/users/Legioth/orgs","repos_url":"https://api.github.com/users/Legioth/repos","events_url":"https://api.github.com/users/Legioth/events{/privacy}","received_events_url":"https://api.github.com/users/Legioth/received_events","type":"User","site_admin":false},"created_at":"2018-10-24T11:46:47Z","updated_at":"2018-10-24T11:46:47Z","author_association":"MEMBER","body":"The core issue here is that `<vaadin-grid>` lacks functionality to take outer scrolling contexts into consideration. It instead only looks at what would be needed based on the height and position of its own scrollbar, which in a `height-by-row` case means that all items should be fetched and rendered.\r\n\r\nConsidering outer scroll positions and heights when fetching items is implied by https://github.com/vaadin/vaadin-grid/issues/1364 but not directly written out there. Once that kind of functionality is added to the web component, the Flow integration would also automatically work as expected.\r\n\r\nAnother problem in this case is that the lack of this functionality leads to quite weird behaviour when the Grid continuously discovers that more items would be needed as it keeps rendering more items. Fetching everything at once would still not be what a developer would expect, but it would make it clear what goes on compared to the current situation where the items are fetched in small batches.\r\n\r\nI was originally thinking that the Flow integration could deal with this situation by eagerly fetching all items from the data provider and populating the client-side cache. I did however realize that the fix should actually be in the web component instead so that it would eagerly fetch all items from its own data provider instead. In that way, there would also not be any \"workaround\" on the Flow side that would have to be removed later on when/if `setHeightByRows(true)` would be updated to take outer scrolling into account.\r\n\r\nIn either case, there isn't really anything to fix in the Flow integration. It should all go into the web component. I've added a clarifying comment to https://github.com/vaadin/vaadin-grid/issues/1364 and opened https://github.com/vaadin/vaadin-grid/issues/1475 about making the web component request all rows at once."}}
{"actor":{"display_login":"Legioth"}}