From 8ad623396d053b5e3cf51b201a9aa3b4962ed922 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20M=C3=BCller?= Date: Wed, 9 Sep 2020 15:19:57 +0200 Subject: [PATCH] fix(b-form-tags): ensure same height with or without tags --- src/components/form-tags/_form-tags.scss | 1 + src/components/form-tags/form-tags.js | 71 ++++++++++++++---------- 2 files changed, 44 insertions(+), 28 deletions(-) diff --git a/src/components/form-tags/_form-tags.scss b/src/components/form-tags/_form-tags.scss index dcf5382b441..6e76e3747e9 100644 --- a/src/components/form-tags/_form-tags.scss +++ b/src/components/form-tags/_form-tags.scss @@ -2,6 +2,7 @@ .b-form-tags-list { margin-top: -0.25rem; + .b-from-tags-field, .b-form-tag { margin-top: 0.25rem; } diff --git a/src/components/form-tags/form-tags.js b/src/components/form-tags/form-tags.js index db6ed187256..dd5cc60abea 100644 --- a/src/components/form-tags/form-tags.js +++ b/src/components/form-tags/form-tags.js @@ -572,7 +572,6 @@ export const BFormTags = /*#__PURE__*/ Vue.extend({ return h( BFormTag, { - key: `li-tag__${tag}`, class: tagClass, props: { // `BFormTag` will auto generate an ID @@ -584,7 +583,8 @@ export const BFormTags = /*#__PURE__*/ Vue.extend({ pill: tagPills, removeLabel: tagRemoveLabel }, - on: { remove: () => removeTag(tag) } + on: { remove: () => removeTag(tag) }, + key: `tags_${tag}` }, tag ) @@ -640,40 +640,52 @@ export const BFormTags = /*#__PURE__*/ Vue.extend({ invisible: disableAddButton }, style: { fontSize: '90%' }, - props: { variant: addButtonVariant, disabled: disableAddButton || isLimitReached }, + props: { + variant: addButtonVariant, + disabled: disableAddButton || isLimitReached + }, on: { click: () => addTag() } }, [this.normalizeSlot('add-button-text') || addButtonText] ) - // ID of the tags+input `