diff --git a/src/Front/Library/Utility/Form.ts b/src/Front/Library/Utility/Form.ts index b595f65..ef0c1ae 100644 --- a/src/Front/Library/Utility/Form.ts +++ b/src/Front/Library/Utility/Form.ts @@ -22,6 +22,7 @@ import Page from '../Loader/Page'; import { MaskInput } from "maska" import Root from '../Dom/Root'; import Arrays from './Arrays'; +import Objects from './Objects'; /** * Form @@ -2196,6 +2197,19 @@ export default class Form { ).then( value => { + + // Check value results + if( + "results" in value && + Array.isArray(value.results) && + value.results.length + ) + + // Iteration value + for(let key in value.results) + + // Set key + value.results[key] = Objects.flatten(value.results[key], "", "."); // Callback with value retrieve callback(value.results); @@ -2228,6 +2242,19 @@ export default class Form { ).then( value => { + // Check value results + if( + "results" in value && + Array.isArray(value.results) && + value.results.length + ) + + // Iteration value + for(let key in value.results) + + // Set key + value.results[key] = Objects.flatten(value.results[key], "", "."); + // Add options to tom selectInstance.addOptions(value.results);