Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Commit b7550af

Browse files
authored
Merge pull request #206 from asigloo/bugfix/label-is-being-rendered-when-null
fix(input): remove label when empty
2 parents 1ce12da + 8cc71ac commit b7550af

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/components/dynamic-input/DynamicInput.vue

+3-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ export default defineComponent({
8080
};
8181
});
8282
83-
const hasLabel = computed(() => props?.control?.type !== 'checkbox');
83+
const hasLabel = computed(
84+
() => props?.control?.label && props?.control?.type !== 'checkbox',
85+
);
8486
const isFieldSet = computed(() => props?.control?.type === 'radio');
8587
8688
const getClasses = computed(() => {

src/styles/themes/default.scss

-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ $input-error-color: #dc3545 !default;
5151
}
5252

5353
.form-group {
54-
display: flex;
5554
width: 100%;
5655
margin-bottom: 1rem;
5756

0 commit comments

Comments
 (0)