Fixes AXO module.

This commit is contained in:
Pedro Silva 2024-04-11 12:03:31 +01:00
parent 995621ba21
commit 2f1c36af40
No known key found for this signature in database
GPG key ID: E2EE20C0669D24B3
7 changed files with 55 additions and 22 deletions

View file

@ -22,6 +22,10 @@ class FormFieldGroup {
return '';
}
if (typeof this.fields[fieldKey].valueCallback === 'function') {
return this.fields[fieldKey].valueCallback(this.data);
}
const path = this.fields[fieldKey].valuePath;
if (!path) {
@ -64,7 +68,7 @@ class FormFieldGroup {
Object.keys(this.fields).forEach((key) => {
const field = this.fields[key];
if (this.active) {
if (this.active && !field.showInput) {
this.hideField(field.selector);
} else {
this.showField(field.selector);
@ -106,6 +110,7 @@ class FormFieldGroup {
}
inputElement(name) {
console.log('inputElement', name);
const baseSelector = this.fields[name].selector;
const select = document.querySelector(baseSelector + ' select');