Fix displaying checkboxes in record list filter UX
This commit is contained in:
@@ -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
|
||||
},
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user