This commit is contained in:
2022-01-29 00:32:45 +00:00
parent 00830f6560
commit 1f4d89c00c
2 changed files with 10 additions and 1 deletions

View File

@@ -848,6 +848,8 @@ BUILD 8.0.0-beta.0.14 CHANGES OF NOTE
- Changed Review biz object notification from general to specific with new ReviewImminent notification event
before was just a default general notification but this prevented being able to customize how it's delivered and tag filters etc
- Fixed bug in search that was ignoring searching for only a specific type
- Improved alphabetical sorting of enumerated object select lists on forms by making case insensitive, for example in search form "PM Item" appeared above "Part" previously due to uppercase M coming before lowercase a
- removed "UNUSED_84" from appearing in object type selection lists

View File

@@ -590,7 +590,14 @@ export default {
// fruits.concat().sort(sortBy("name"));
// => [{name:"apple", amount: 4}, {name:"banana", amount: 2}, {name:"mango", amount: 1}, {name:"pineapple", amount: 2}]
sortByKey: key => {
return (a, b) => (a[key] > b[key] ? 1 : b[key] > a[key] ? -1 : 0);
return (a, b) => {
const aaa = a[key].toUpperCase();
const bbb = b[key].toUpperCase();
return aaa > bbb ? 1 : bbb > aaa ? -1 : 0;
//this was the original but it was sorting weird as it was taking case into account with uppercase higher than lowercase
//so PMItem came before Part in the object lists
//return a[key] > b[key] ? 1 : b[key] > a[key] ? -1 : 0;
};
},
///////////////////////////////////////////////
// "has" lodash replacement