Fix displaying checkboxes in record list filter UX

This commit is contained in:
Jože Fortun
2024-10-08 13:23:20 +02:00
parent 36a787f705
commit 5dc7678235
4 changed files with 7 additions and 9 deletions
@@ -49,7 +49,7 @@
</c-input-checkbox>
<div
v-if="!field.options.switch"
v-if="!valueOnly && !field.options.switch"
class="small text-muted"
>
{{ description }}
@@ -111,10 +111,6 @@ export default {
},
label () {
if (this.valueOnly) {
return ''
}
return this.field.label || this.field.name
},
+3 -3
View File
@@ -72,18 +72,18 @@ export default {
},
mounted () {
this.fetchRoles()
this.fetchRoles(this.preselect)
},
methods: {
fetchRoles () {
fetchRoles (preselect = false) {
this.loading = true
return this.$SystemAPI.roleList({ query: this.filter, limit: 20 })
.then(({ set }) => {
this.roles = set.filter(this.visible)
if (this.preselect && (!this.value || !this.value.length)) {
if (preselect && (!this.value || !this.value.length)) {
this.updateValue(this.roles[0])
}
}).finally(() => {
@@ -234,12 +234,14 @@ export default {
margin: 0;
}
&:not(.vs--open) .vs__selected + .vs__search {
&:not(.vs--open):not(.vs--loading) .vs__selected + .vs__search {
// force this to not use any space
// we still need it to be rendered for the focus
width: 0;
margin: 0;
border: none;
padding: 0;
height: 0;
}
.vs__dropdown-toggle {