diff --git a/projects/common-form-elements/src/lib/dynamic-dropdown/dynamic-dropdown.component.css b/projects/common-form-elements/src/lib/dynamic-dropdown/dynamic-dropdown.component.css index 9e0a1234e8564e64c9ef58fcd04b9a05b0dd15aa..f0ec9d764b3bf94bbed8738d67489cfabe6a7b95 100644 --- a/projects/common-form-elements/src/lib/dynamic-dropdown/dynamic-dropdown.component.css +++ b/projects/common-form-elements/src/lib/dynamic-dropdown/dynamic-dropdown.component.css @@ -96,7 +96,7 @@ outline: none; .dd-dropdown-li{ position: relative; display: block; - padding: .75rem 1.25rem; + padding: .4rem 0.5rem; background-color: #fff; } #dd-dropdown li:hover {background-color:#eee;} @@ -119,6 +119,7 @@ display: -webkit-box; .sb-dropdown .dropdown-container .dd-container{ border: 0.5px solid var(--gray-400); font-size: 14px; + height: 40px; } .form-floating { diff --git a/projects/common-form-elements/src/lib/dynamic-dropdown/dynamic-dropdown.component.ts b/projects/common-form-elements/src/lib/dynamic-dropdown/dynamic-dropdown.component.ts index 0c82989687f96558683f8bdc13791dc7ed0279c2..11396bce6169fc0e8bc1532d7d45b9ec4b5f7f77 100644 --- a/projects/common-form-elements/src/lib/dynamic-dropdown/dynamic-dropdown.component.ts +++ b/projects/common-form-elements/src/lib/dynamic-dropdown/dynamic-dropdown.component.ts @@ -73,6 +73,10 @@ export class DynamicDropdownComponent implements OnInit, OnChanges, OnDestroy { this.options = []; } + if (!_.isEmpty(this.field.sourceCategory)) { + this.formControlRef.sourceCategory = this.field.sourceCategory; + } + if (this.field && this.field.isSearchable) { this.isSearchable = this.field.isSearchable; } @@ -111,6 +115,7 @@ export class DynamicDropdownComponent implements OnInit, OnChanges, OnDestroy { this.latestParentValue = value; this.isDependsInvalid = _.includes(_.map(this.depends, depend => depend.invalid), true); this.formControlRef.patchValue(null); + this.showSelectdItem = null; }) ).subscribe();