mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Bugfix: inputosaurus revamp failed due to missing onChange handling
This commit is contained in:
parent
39f39db447
commit
673f1bff79
2 changed files with 8 additions and 12 deletions
6
dev/External/User/ko.js
vendored
6
dev/External/User/ko.js
vendored
|
|
@ -79,9 +79,9 @@ ko.bindingHandlers.emailsTags = {
|
|||
}).flat(Infinity).map(
|
||||
item => (item.toLine ? [item.toLine(false), item] : [item, null])
|
||||
),
|
||||
change: event => {
|
||||
element.EmailsTagsValue = event.target.value;
|
||||
fValue(event.target.value);
|
||||
onChange: value => {
|
||||
element.EmailsTagsValue = value;
|
||||
fValue(value);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
14
vendors/inputosaurus/inputosaurus.js
vendored
14
vendors/inputosaurus/inputosaurus.js
vendored
|
|
@ -43,11 +43,6 @@ window.Inputosaurus = class {
|
|||
|
||||
self.options = Object.assign({
|
||||
|
||||
// bindable events
|
||||
//
|
||||
// 'change' - triggered whenever a tag is added or removed (should be similar to binding the the change event of the instantiated input
|
||||
// 'keyup' - keyup event on the newly created input
|
||||
|
||||
// while typing, the user can separate values using these delimiters
|
||||
// the value tags are created on the fly when an inputDelimiter is detected
|
||||
inputDelimiters : [',', ';', '\n'],
|
||||
|
|
@ -61,7 +56,9 @@ window.Inputosaurus = class {
|
|||
// the array of tag names is passed and expected to be returned as an array after manipulation
|
||||
parseHook : null,
|
||||
|
||||
splitHook : null
|
||||
splitHook : null,
|
||||
|
||||
onChange : null
|
||||
}, options);
|
||||
|
||||
self._chosenValues = [];
|
||||
|
|
@ -93,7 +90,6 @@ window.Inputosaurus = class {
|
|||
}
|
||||
|
||||
element.replaceWith(els.ul);
|
||||
element.hidden = true;
|
||||
|
||||
els.inputCont = createEl('li',{class:"inputosaurus-input"});
|
||||
els.inputCont.append(els.input);
|
||||
|
|
@ -344,9 +340,9 @@ window.Inputosaurus = class {
|
|||
}
|
||||
|
||||
_setValue(value) {
|
||||
var val = this.element.value;
|
||||
if (val !== value) {
|
||||
if (this.element.value !== value) {
|
||||
this.element.value = value;
|
||||
this.options.onChange(value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue