From 106b4e844c200de52da0ba91c5f4df898feeb93f Mon Sep 17 00:00:00 2001 From: Sushant Kumar Date: Thu, 31 Oct 2019 09:54:35 +1100 Subject: [PATCH] feat: Added ability to mark control as hidden --- src/js/components/controls/control.js | 1 + src/js/components/controls/html/hr.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/js/components/controls/control.js b/src/js/components/controls/control.js index dced8ea8..afb627c4 100644 --- a/src/js/components/controls/control.js +++ b/src/js/components/controls/control.js @@ -10,6 +10,7 @@ export default class Control { constructor({ events = {}, dependencies = {}, ...restConfig } = {}) { this.events = events this.controlData = restConfig + this.controlData.attrs = Object.assign({}, this.controlData.attrs, {hidden: false}); this.depsLoaded = this.fetchDependencies(dependencies) } diff --git a/src/js/components/controls/html/hr.js b/src/js/components/controls/html/hr.js index 7257f709..4fbb4993 100644 --- a/src/js/components/controls/html/hr.js +++ b/src/js/components/controls/html/hr.js @@ -14,6 +14,9 @@ class HRControl extends Control { icon: 'divider', id: 'divider', }, + attrs: { + className: '', + } } super(hrConfig) }