issue: customer communication contacts grid height.
change: replace schedule date control. change: date validation from 1753-01-01 to 9999-12-31.
This commit is contained in:
@ -281,18 +281,21 @@ export class Dropdown {
|
||||
|
||||
get selectedList() { return this._var.selectedList || [] }
|
||||
|
||||
select(selected, silence) {
|
||||
select(selected, silence, ignoreCase) {
|
||||
if (typeof selected !== 'string') {
|
||||
selected = String(selected);
|
||||
}
|
||||
if (ignoreCase) {
|
||||
selected = selected.toLowerCase();
|
||||
}
|
||||
if (this._var.lastSelected === selected) {
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
this._var.lastSelected = selected;
|
||||
const valuekey = this._var.options.valueKey;
|
||||
const textkey = this._var.options.textKey;
|
||||
const htmlkey = this._var.options.htmlKey;
|
||||
let item = this.source.find(it => String(it[valuekey]) === selected);
|
||||
let item = this.source.find(it => (ignoreCase ? String(it[valuekey]).toLowerCase() : String(it[valuekey])) === selected);
|
||||
if (this._var.options.input) {
|
||||
if (item == null) {
|
||||
item = { [valuekey]: selected };
|
||||
@ -322,7 +325,7 @@ export class Dropdown {
|
||||
}
|
||||
if (expanded) {
|
||||
for (let li of this._var.container.querySelectorAll('li[data-value]')) {
|
||||
if (li.dataset.value === selected) {
|
||||
if ((ignoreCase ? li.dataset.value.toLowerCase() : li.dataset.value) === selected) {
|
||||
li.classList.add('selected');
|
||||
break;
|
||||
}
|
||||
@ -338,6 +341,7 @@ export class Dropdown {
|
||||
if (!silence && typeof this.onSelected === 'function') {
|
||||
this.onSelected(item);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
selectlist(selectedlist, silence) {
|
||||
|
Reference in New Issue
Block a user