fix: sort fields to move checkboxes to the end in filter area (#35440)

This commit is contained in:
Saqib Ansari 2025-12-24 15:55:32 +05:30 committed by GitHub
parent 54a5b559cc
commit 9ff5f39c74
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1219,6 +1219,17 @@ class FilterArea {
})
);
// sort fields to move checkboxes at the end
fields.sort((a, b) => {
if (a.fieldtype === "Check" && b.fieldtype !== "Check") {
return 1;
} else if (a.fieldtype !== "Check" && b.fieldtype === "Check") {
return -1;
} else {
return 0;
}
});
fields.map((df) => {
this.list_view.page.add_field(df, this.standard_filters_wrapper);