From ab2f389d8ad9fc26e88221aff903b64df275350e Mon Sep 17 00:00:00 2001 From: Leonardo Matos Date: Thu, 7 May 2020 15:59:16 -0300 Subject: [PATCH] fix(admin-settings-form): preset data field value with default fixes https://github.com/ecomplus/admin-marketplace/issues/98 --- src/components/js/EcAdminSettingsForm.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/js/EcAdminSettingsForm.js b/src/components/js/EcAdminSettingsForm.js index ada9c08..39c9107 100644 --- a/src/components/js/EcAdminSettingsForm.js +++ b/src/components/js/EcAdminSettingsForm.js @@ -135,6 +135,9 @@ export default { component }) } + if (localSchema.default) { + data[field] = localSchema.default + } if (localSchema.type === 'object') { if (!data[field]) { this.$set(data, field, {})