From 3b4afe838ca935a6a7230865fed1d6a035bc33c7 Mon Sep 17 00:00:00 2001 From: Alice Groux Date: Fri, 19 Feb 2021 23:26:32 +0100 Subject: [PATCH] feat(app/endpoint-group): replace the tag dropdown by isteven-multi-select (#4714) * feat-app/endpoint-group): replace the tag dropdown by isteven-multi-select * feat(app/endpoint-group): fix the dropdown height * feat(app/tag-selector): remove the slice on filtered tags and add some style to fix the dropdown height --- app/assets/css/app.css | 7 +++++++ app/portainer/components/tag-selector/tagSelector.html | 2 +- .../components/tag-selector/tagSelectorController.js | 6 +++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/app/assets/css/app.css b/app/assets/css/app.css index 4ce4aab3c..e41e1b01c 100644 --- a/app/assets/css/app.css +++ b/app/assets/css/app.css @@ -1016,3 +1016,10 @@ json-tree .branch-preview { .w-full { width: 100%; } + +/* uib-typeahead override */ +#scrollable-dropdown-menu .dropdown-menu { + max-height: 300px; + overflow-y: auto; +} +/* !uib-typeahead override */ diff --git a/app/portainer/components/tag-selector/tagSelector.html b/app/portainer/components/tag-selector/tagSelector.html index 888af452e..d893ff989 100644 --- a/app/portainer/components/tag-selector/tagSelector.html +++ b/app/portainer/components/tag-selector/tagSelector.html @@ -15,7 +15,7 @@ -
+
!_.includes(this.model, tag.Id)); if (!searchValue) { - return filteredTags.slice(0, 7); + return filteredTags; } const exactTag = _.find(this.tags, (tag) => tag.Name === searchValue); filteredTags = _.filter(filteredTags, (tag) => _.includes(tag.Name.toLowerCase(), searchValue.toLowerCase())); if (exactTag || !this.allowCreate) { - return filteredTags.slice(0, 7); + return filteredTags; } - return filteredTags.slice(0, 6).concat({ Name: `Create "${searchValue}"`, create: true, value: searchValue }); + return filteredTags.concat({ Name: `Create "${searchValue}"`, create: true, value: searchValue }); } generateSelectedTags(model, tags) {