updates
This commit is contained in:
@@ -1,25 +1,15 @@
|
||||
//import { Ut } from ".";
|
||||
import { Ut } from ".";
|
||||
|
||||
export class AppendOptions {
|
||||
|
||||
constructor(target, data, opts) {
|
||||
|
||||
|
||||
opts = opts || {};
|
||||
|
||||
if (opts.clear) {
|
||||
this.dxHtml('');
|
||||
}
|
||||
|
||||
if (typeof data === 'string') {
|
||||
Object.entries(JSON.parse(data)).forEach(([k, v]) => target.append(new Option(v, k)));
|
||||
}
|
||||
else {
|
||||
|
||||
for (let id in data) {
|
||||
target.append(new Option(data[id], id));
|
||||
}
|
||||
this.replaceChildren();
|
||||
}
|
||||
|
||||
Ut.each(Ut.isStr(data) ? JSON.parse(data) : data, (val, id) => target.append(new Option(val, id)) );
|
||||
}
|
||||
}
|
||||
|
||||
// Ut.extendNodeUx(AppendOptions);
|
||||
}
|
||||
+1
-3
@@ -55,6 +55,4 @@ export class Form extends FormValidator {
|
||||
});
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
//Ut.extendNodeUx(Form);
|
||||
}
|
||||
@@ -122,6 +122,4 @@ export class Options {
|
||||
this.target.dxHtml('');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Ut.extendNodeUx(Options);
|
||||
}
|
||||
@@ -220,6 +220,4 @@ export class FormValidator extends Validator {
|
||||
this.target.dxOff('submit.form click.form keydown.form click.ui');
|
||||
this.target.dxRemoveData('form');
|
||||
}
|
||||
}
|
||||
|
||||
// Ut.extendNodeUx(FormValidator);
|
||||
}
|
||||
@@ -40,6 +40,4 @@ export class InputError {
|
||||
this.fieldWrapper.classList.remove('form-field-error');
|
||||
this.fieldWrapper.dxFind('.sp-label-error')?.remove();
|
||||
}
|
||||
}
|
||||
|
||||
//Ut.extendNodeUx(InputError);
|
||||
}
|
||||
Reference in New Issue
Block a user