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

Commit

Permalink
Merge pull request #206 from asigloo/bugfix/label-is-being-rendered-w…
Browse files Browse the repository at this point in the history
…hen-null

fix(input): remove label when empty
  • Loading branch information
alvarosabu authored Dec 14, 2020
2 parents 1ce12da + 8cc71ac commit b7550af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/components/dynamic-input/DynamicInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ export default defineComponent({
};
});
const hasLabel = computed(() => props?.control?.type !== 'checkbox');
const hasLabel = computed(
() => props?.control?.label && props?.control?.type !== 'checkbox',
);
const isFieldSet = computed(() => props?.control?.type === 'radio');
const getClasses = computed(() => {
Expand Down
1 change: 0 additions & 1 deletion src/styles/themes/default.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ $input-error-color: #dc3545 !default;
}

.form-group {
display: flex;
width: 100%;
margin-bottom: 1rem;

Expand Down

0 comments on commit b7550af

Please sign in to comment.