From 7655efe976b5ac8b2b2546b390034494d7a4f536 Mon Sep 17 00:00:00 2001 From: maltheism <16293415+maltheism@users.noreply.github.com> Date: Mon, 15 Jun 2020 09:02:34 -0400 Subject: [PATCH] [module_manager] remove extra padding on selectelement for dynamictable (#6717) Resolves unnecessary padding to SelectElement components used inside the DynamicTable component. Resolves #6697 --- jsx/Form.js | 8 +++++--- modules/module_manager/jsx/modulemanager.js | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/jsx/Form.js b/jsx/Form.js index 88668d7fef6..967f78df685 100644 --- a/jsx/Form.js +++ b/jsx/Form.js @@ -430,7 +430,7 @@ class SelectElement extends Component { let errorMessage = null; let emptyOptionHTML = null; let requiredHTML = null; - let elementClass = 'row form-group'; + let elementClass = this.props.noMargins ? '' : 'row form-group'; // Add required asterisk if (required) { @@ -445,7 +445,7 @@ class SelectElement extends Component { // Add error message if (this.props.hasError || (this.props.required && this.props.value === '')) { errorMessage = {this.props.errorMessage}; - elementClass = 'row form-group has-error'; + elementClass = elementClass + ' has-error'; } let newOptions = {}; @@ -477,7 +477,7 @@ class SelectElement extends Component { // and retain formatting. If label prop is not provided at all, the input // element will take up the whole row. let label = null; - let inputClass = 'col-sm-12'; + let inputClass = this.props.noMargins ? '' : 'col-sm-12'; if (this.props.label && this.props.label != '') { label = (