people page loading fix

refs VICE-4525
flag=none

Test plan:
-"Rubric Enhancements" flag should be disabled
-"people page upgrade" flag should be disabled
- Create a course with +200 users
- go to the people page
- the people should load on scroll down
- every users should be displayed by the end

Change-Id: Id71edce229411bff8511c974851013c85cf968fe
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/355567
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Tamás Balogh <tamas.balogh@instructure.com>
QA-Review: Dora Csolakov <dora.csolakov@instructure.com>
Reviewed-by: Mario Hegyi <mario.hegyi@instructure.com>
Reviewed-by: Daniel Matyas Vincze <daniel.vincze@instructure.com>
This commit is contained in:
theo sorriaux 2024-08-21 16:25:52 +02:00 committed by SaltNPepa
parent 4dcd3448b6
commit c32f6579c5
1 changed files with 8 additions and 1 deletions

View File

@ -125,4 +125,11 @@ users.once('reset', () =>
app.render()
ready(() => app.$el.appendTo($('#content')))
users.fetch()
users.fetch({
success() {
if (users.length === 0) return
// PaginatedCollectionView first's attempt to get the container does not wait for the DOM to be ready
// so when we recieve the users data we need to reset the scroll container, to be sure
usersView.resetScrollContainer(document.getElementById('drawer-layout-content') || window)
},
})