Skip to content

Commit

Permalink
Fix displaying checkboxes in record list filter UX
Browse files Browse the repository at this point in the history
  • Loading branch information
Fajfa committed Oct 8, 2024
1 parent 36a787f commit 5dc7678
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
</c-input-checkbox>

<div
v-if="!field.options.switch"
v-if="!valueOnly && !field.options.switch"
class="small text-muted"
>
{{ description }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,6 @@ export default {
},
label () {
if (this.valueOnly) {
return ''
}
return this.field.label || this.field.name
},
Expand Down
6 changes: 3 additions & 3 deletions lib/vue/src/components/input/CInputRole.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down
4 changes: 3 additions & 1 deletion lib/vue/src/components/input/CInputSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 5dc7678

Please sign in to comment.