mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-02-02 05:43:39 -08:00
fix scrolling bug caused by invalid filtering and sorting
This commit is contained in:
parent
ec300d6917
commit
2f8ee1998f
1 changed files with 5 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue