Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { createApp } from 'vue'
import App from './App.vue'
import router from './router.js'
import { translate as t, translatePlural as n } from '@nextcloud/l10n'
import './styles/select-selected-label.scss'

const pinia = createPinia()

Expand Down
11 changes: 9 additions & 2 deletions src/modules/modals/CreateRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,16 @@ export default {
min-width: 100% !important;
}

:where(.name-parts) {
:deep(.vs__search) {
min-width: 0 !important;
}

:deep(.vs__selected .name-parts) {
display: block !important;
max-width: fit-content !important;
max-width: 100% !important;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}

Expand Down
11 changes: 9 additions & 2 deletions src/modules/modals/EditRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,16 @@ export default {
min-width: 100% !important;
}

:where(.name-parts) {
:deep(.vs__search) {
min-width: 0 !important;
}

:deep(.vs__selected .name-parts) {
display: block !important;
max-width: fit-content !important;
max-width: 100% !important;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
:reduce="(option) => option.id"
:aria-label-combobox="t('tables', 'Select relation value')"
:disabled="localLoading || !canEditCell()"
style="width: 100%;" />
class="relation-select" />
<div v-if="localLoading" class="loading-indicator">
<div class="icon-loading-small icon-loading-inline" />
</div>
Expand Down Expand Up @@ -169,6 +169,11 @@ export default {
</script>

<style lang="scss" scoped>
.relation-select {
width: 100%;
min-width: 0;
}

.cell-relation {
width: 100%;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
<template>
<RowFormWrapper :title="column.title" :mandatory="column.mandatory" :description="column.description" :width="2" :readonly="column.readonly">
<RowFormWrapper :title="column.title" :mandatory="column.mandatory" :description="column.description" :readonly="column.readonly">
<NcSelect
v-model="localValue"
class="relation-select"
:options="relationOptions"
:clearable="!column.mandatory"
:reduce="(option) => option.id"
Expand Down Expand Up @@ -90,7 +91,8 @@ export default {
</script>

<style lang="scss" scoped>
.relation-form {
.relation-select {
width: 100%;
min-width: 0;
}
</style>
31 changes: 31 additions & 0 deletions src/styles/select-selected-label.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

/* Keep a long selected value inside the field, before the clear and dropdown icons. */
.v-select.select {
width: 100%;
min-width: 0;
max-width: 100%;

.vs__actions {
flex-shrink: 0;
}
}

.v-select.select.vs--single {
.vs__selected-options {
min-width: 0;
overflow: hidden;
}

.vs__selected {
display: block;
flex: 1 1 auto;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
Loading