Skip to content

Commit a7dfec0

Browse files
Merge pull request #44381 from nextcloud/fix/workflows-engine-groups
fix(workflowengine): Use correct event names to make search for groups work again
2 parents c161f0c + 4354b46 commit a7dfec0

3 files changed

Lines changed: 18 additions & 9 deletions

File tree

apps/workflowengine/src/components/Checks/RequestUserGroup.vue

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,26 @@
2222

2323
<template>
2424
<div>
25-
<NcSelect :value="currentValue"
25+
<NcSelect :aria-label-combobox="t('workflowengine', 'Select groups')"
26+
:aria-label-listbox="t('workflowengine', 'Groups')"
27+
:clearable="false"
2628
:loading="status.isLoading && groups.length === 0"
29+
:placeholder="t('workflowengine', 'Type to search for group …')"
2730
:options="groups"
28-
:clearable="false"
31+
:value="currentValue"
2932
label="displayname"
30-
@search-change="searchAsync"
33+
@search="searchAsync"
3134
@input="(value) => $emit('input', value.id)" />
3235
</div>
3336
</template>
3437

3538
<script>
36-
import NcSelect from '@nextcloud/vue/dist/Components/NcSelect.js'
37-
import axios from '@nextcloud/axios'
39+
import { translate as t } from '@nextcloud/l10n'
3840
import { generateOcsUrl } from '@nextcloud/router'
3941
42+
import axios from '@nextcloud/axios'
43+
import NcSelect from '@nextcloud/vue/dist/Components/NcSelect.js'
44+
4045
const groups = []
4146
const status = {
4247
isLoading: false,
@@ -69,14 +74,18 @@ export default {
6974
},
7075
},
7176
async mounted() {
77+
// If empty, load first chunk of groups
7278
if (this.groups.length === 0) {
7379
await this.searchAsync('')
7480
}
75-
if (this.currentValue === null) {
81+
// If a current group is set but not in our list of groups then search for that group
82+
if (this.currentValue === null && this.value) {
7683
await this.searchAsync(this.value)
7784
}
7885
},
7986
methods: {
87+
t,
88+
8089
searchAsync(searchQuery) {
8190
if (this.status.isLoading) {
8291
return

dist/workflowengine-workflowengine.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/workflowengine-workflowengine.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)