2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 07:40:55 +00:00

"New Item" link item should be last

This commit is contained in:
Faris Ansari 2018-04-19 15:43:55 +05:30
parent 3a085b1c66
commit 6cadb5fc1f

View File

@ -14,6 +14,12 @@ class LinkControl extends BaseControl {
minChars: 0,
maxItems: 99,
filter: () => true,
sort: (a, b) => {
if (a.value === '__newitem' || b.value === '__newitem') {
return -1;
}
return a.value > b.value;
}
});
// rebuild the list on input