mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
Revert "list_render: Clean up initialization."
I pushed this risk commit to the end of a PR that had a bunch of harmless prep commits at the front, and I didn't make it clear enough that the last commit (this one) hadn't been tested thoroughly. For the list_render widget, we can simplify the intialization pretty easily (avoid extra sorts, for example), but the cache aspects are still tricky on subsequent calls.
This commit is contained in:
@@ -46,7 +46,7 @@ function populate_invites(invites_data) {
|
||||
|
||||
const invites_table = $("#admin_invites_table").expectOne();
|
||||
|
||||
list_render.create(invites_table, invites_data.invites, {
|
||||
const invites_list = list_render.create(invites_table, invites_data.invites, {
|
||||
name: 'admin_invites_list',
|
||||
modifier: function (item) {
|
||||
item.invited_absolute_time = timerender.absolute_time(item.invited * 1000);
|
||||
@@ -64,12 +64,11 @@ function populate_invites(invites_data) {
|
||||
},
|
||||
},
|
||||
parent_container: $("#admin-invites-list").expectOne(),
|
||||
init_sort: [sort_invitee],
|
||||
sort_fields: {
|
||||
invitee: sort_invitee,
|
||||
},
|
||||
});
|
||||
|
||||
invites_list.sort('invitee');
|
||||
invites_list.add_sort_function('invitee', sort_invitee);
|
||||
|
||||
loading.destroy_indicator($('#admin_page_invites_loading_indicator'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user