UX: Remember scroll position in assign lists (#82)

UX: Remember scroll position in assign lists (#82)

diff --git a/assets/javascripts/discourse/templates/components/basic-assigned-topic-list.hbs b/assets/javascripts/discourse/templates/components/basic-assigned-topic-list.hbs
index 2090030..6d35127 100644
--- a/assets/javascripts/discourse/templates/components/basic-assigned-topic-list.hbs
+++ b/assets/javascripts/discourse/templates/components/basic-assigned-topic-list.hbs
@@ -18,7 +18,9 @@
                           skipHeader=skipHeader
                           tagsForUser=tagsForUser
                           unassign=unassign
-                          reassign=reassign}}
+                          reassign=reassign
+                          onScroll=onScroll
+                          scrollOnLoad=scrollOnLoad}}
   {{else}}
     {{#unless loadingMore}}
     <div class='alert alert-info'>
diff --git a/assets/javascripts/discourse/templates/group-topics-list.hbs b/assets/javascripts/discourse/templates/group-topics-list.hbs
index 8d177d2..4d3237a 100644
--- a/assets/javascripts/discourse/templates/group-topics-list.hbs
+++ b/assets/javascripts/discourse/templates/group-topics-list.hbs
@@ -9,7 +9,9 @@
                               showInserted=(action "showInserted")
                               tagsForUser=tagsForUser
                               unassign=(action 'unassign')
-                              reassign=(action 'reassign')}}
+                              reassign=(action 'reassign')
+                              onScroll=saveScrollPosition
+                              scrollOnLoad=true}}
 
   {{conditional-loading-spinner condition=model.loadingMore}}
 {{/load-more}}
diff --git a/assets/javascripts/discourse/templates/user-assigned-topics.hbs b/assets/javascripts/discourse/templates/user-assigned-topics.hbs
index f14fe20..5b25af2 100644
--- a/assets/javascripts/discourse/templates/user-assigned-topics.hbs
+++ b/assets/javascripts/discourse/templates/user-assigned-topics.hbs
@@ -9,7 +9,9 @@
                               showInserted=(action "showInserted")
                               tagsForUser=tagsForUser
                               unassign=(action 'unassign')
-                              reassign=(action 'reassign')}}
+                              reassign=(action 'reassign')
+                              onScroll=saveScrollPosition
+                              scrollOnLoad=true}}
 
   {{conditional-loading-spinner condition=model.loadingMore}}
 {{/load-more}}

GitHub sha: 4d5169c4

1 Like

This commit appears in #82 which was merged by davidtaylorhq.