Fix CInputSelect not emiting loading on search

This commit is contained in:
Jože Fortun
2024-03-01 12:08:37 +01:00
parent 3b3c063df8
commit 01bd594118
3 changed files with 10 additions and 2 deletions
@@ -66,6 +66,10 @@ export default {
getWorkflowLabel ({ workflowID, handle, meta = {} }) {
return meta.name || handle || workflowID
},
getWorkflowKey ({ workflowID, handle }) {
return handle || workflowID
},
},
}
</script>
@@ -126,7 +126,7 @@
v-model="a.value"
:options="workflowOptions"
:get-option-label="getWorkflowLabel"
:get-option-key="getOptionWorkflowKey"
:get-option-key="getWorkflowKey"
:reduce="wf => a.type === 'ID' ? wf.workflowID : wf.handle"
:placeholder="$t('steps:function.configurator.search-workflow')"
@input="$root.$emit('change-detected')"
@@ -10,7 +10,7 @@
:append-to-body="appendToBody"
class="bg-white rounded"
:class="sizeClass"
@search="($event) => $emit('search', $event)"
@search="onSearch"
>
<template
v-for="(_, name) in $scopedSlots"
@@ -135,6 +135,10 @@ export default {
*/
return () => popper.destroy()
},
onSearch (search, loading) {
this.$emit('search', search, loading)
},
},
}
</script>