mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-06-07 21:20:49 +00:00
fix scrolling bug caused by invalid filtering and sorting
This commit is contained in:
parent
ec300d6917
commit
2f8ee1998f
@ -227,7 +227,11 @@ class ExtraNetworksClusterize extends Clusterize {
|
||||
}
|
||||
|
||||
async sortDataDefaultCallback() {
|
||||
this.data_obj_keys_sorted = this.sort_fn(this.data_obj);
|
||||
// we want to apply the sort to the visible items only.
|
||||
const filtered = Object.fromEntries(
|
||||
Object.entries(this.data_obj).filter(([k, v]) => v.visible)
|
||||
);
|
||||
this.data_obj_keys_sorted = this.sort_fn(filtered);
|
||||
if (this.sort_reverse) {
|
||||
this.data_obj_keys_sorted = this.data_obj_keys_sorted.reverse();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user