Skip to content

Commit ee99786

Browse files
committed
Resolve FOUR-29252
1 parent 25c7763 commit ee99786

1 file changed

Lines changed: 52 additions & 1 deletion

File tree

resources/js/components/shared/ProjectSelect.vue

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="form-group">
2+
<div class="form-group project-select">
33
<label>{{ $t(label) }}</label>
44
<multiselect
55
v-model="content"
@@ -14,10 +14,26 @@
1414
:show-labels="false"
1515
:searchable="true"
1616
:internal-search="true"
17+
class="project-select__multiselect"
1718
@open="load()"
1819
@search-change="load"
1920
@select="(selected) => lastSelectedId = selected.id"
2021
>
22+
<template slot="tag" slot-scope="slotProps">
23+
<span
24+
class="project-select__tag multiselect__tag"
25+
:title="slotProps.option.title"
26+
>
27+
<span class="project-select__tag-label">{{ slotProps.option.title }}</span>
28+
<i
29+
aria-hidden="true"
30+
tabindex="1"
31+
class="multiselect__tag-icon"
32+
@mousedown.prevent
33+
@click="slotProps.remove(slotProps.option)"
34+
/>
35+
</span>
36+
</template>
2137
<template slot="noResult">
2238
{{ $t('No elements found. Consider changing the search query.') }}
2339
</template>
@@ -147,3 +163,38 @@ export default {
147163
},
148164
};
149165
</script>
166+
167+
<style scoped>
168+
.project-select {
169+
min-width: 0;
170+
}
171+
172+
.project-select__multiselect {
173+
min-width: 0;
174+
}
175+
176+
.project-select__tag {
177+
align-items: center;
178+
display: inline-flex;
179+
max-width: 100%;
180+
min-width: 0;
181+
}
182+
183+
.project-select__tag-label {
184+
min-width: 0;
185+
overflow: hidden;
186+
text-overflow: ellipsis;
187+
white-space: nowrap;
188+
}
189+
190+
::v-deep .multiselect__tags {
191+
max-width: 100%;
192+
}
193+
194+
::v-deep .multiselect__tags-wrap {
195+
display: flex;
196+
flex-wrap: wrap;
197+
gap: 0.25rem;
198+
max-width: 100%;
199+
}
200+
</style>

0 commit comments

Comments
 (0)