remider duration impr

This commit is contained in:
Yuri Kuznetsov
2022-11-18 18:14:19 +02:00
parent 2ff28ba8ca
commit 93fb78cf71
3 changed files with 9 additions and 0 deletions
@@ -192,6 +192,8 @@ function (Dep, /** module:ui/select*/Select, moment) {
Select.init($type, {});
Select.init($seconds, {
sortBy: '$score',
sortDirection: 'desc',
/**
* @param {string} search
* @param {string} value
+5
View File
@@ -36,6 +36,8 @@ define('ui/select', ['lib!Selectize'], (Selectize) => {
* @property {function(string, module:ui/select~OptionItemsCallback): void} [load] Loads additional items
* when typing in search.
* @property {function(string, string, string): Number} [score] A score function scoring searched items.
* @property {'value'|'text'|'$order'|'$score'} [sortBy='$order'] Item sorting.
* @property {'asc'|'desc'} [sortDirection='asc'] Sort direction.
*/
/**
@@ -84,6 +86,7 @@ define('ui/select', ['lib!Selectize'], (Selectize) => {
});
let selectizeOptions = {
sortField: [{field: options.sortBy, direction: options.sortDirection}],
load: options.load,
loadThrottle: 1,
plugins: plugins,
@@ -230,6 +233,8 @@ define('ui/select', ['lib!Selectize'], (Selectize) => {
let defaults = {
selectOnTab: false,
matchAnyWord: false,
sortBy: '$order',
sortDirection: 'asc',
};
for (let key in defaults) {
+2
View File
@@ -265,6 +265,8 @@ function (Dep, /** module:ui/select*/Select) {
}
Select.init(this.$duration, {
sortBy: '$score',
sortDirection: 'desc',
/**
* @param {string} search
* @param {string} value