Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable28] fix(workflowengine): Use correct event names to make search for groups work again #44382

Merged
merged 2 commits into from
Mar 21, 2024
Merged
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
21 changes: 15 additions & 6 deletions apps/workflowengine/src/components/Checks/RequestUserGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,26 @@

<template>
<div>
<NcSelect :value="currentValue"
<NcSelect :aria-label-combobox="t('workflowengine', 'Select groups')"
:aria-label-listbox="t('workflowengine', 'Groups')"
:clearable="false"
:loading="status.isLoading && groups.length === 0"
:placeholder="t('workflowengine', 'Type to search for group …')"
:options="groups"
:clearable="false"
:value="currentValue"
label="displayname"
@search-change="searchAsync"
@search="searchAsync"
@input="(value) => $emit('input', value.id)" />
</div>
</template>

<script>
import NcSelect from '@nextcloud/vue/dist/Components/NcSelect.js'
import axios from '@nextcloud/axios'
import { translate as t } from '@nextcloud/l10n'
import { generateOcsUrl } from '@nextcloud/router'

import axios from '@nextcloud/axios'
import NcSelect from '@nextcloud/vue/dist/Components/NcSelect.js'

const groups = []
const status = {
isLoading: false,
Expand Down Expand Up @@ -69,14 +74,18 @@ export default {
},
},
async mounted() {
// If empty, load first chunk of groups
if (this.groups.length === 0) {
await this.searchAsync('')
}
if (this.currentValue === null) {
// If a current group is set but not in our list of groups then search for that group
if (this.currentValue === null && this.value) {
await this.searchAsync(this.value)
}
},
methods: {
t,

searchAsync(searchQuery) {
if (this.status.isLoading) {
return
Expand Down
4 changes: 2 additions & 2 deletions dist/workflowengine-workflowengine.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/workflowengine-workflowengine.js.map

Large diffs are not rendered by default.

Loading