This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
:search-input.sync="searchEntry"
|
||||
:filter="customFilter"
|
||||
hide-no-data
|
||||
:clearable="!readonly"
|
||||
:clearable="!readonly && canClear"
|
||||
:no-filter="isTagFilter"
|
||||
:append-icon="errorIcon"
|
||||
@click:append="handleErrorClick"
|
||||
@@ -76,8 +76,12 @@ export default {
|
||||
showEditIcon: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
allowNoSelection: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
|
||||
canClear:{type: Boolean, default: true},
|
||||
label: { type: String, default: "" }
|
||||
},
|
||||
watch: {
|
||||
@@ -166,9 +170,11 @@ export default {
|
||||
e = window.$gz.form.getNoSelectionItem(true);
|
||||
}
|
||||
|
||||
this.lastSelection = e;
|
||||
|
||||
//this is required for the control to update and parent form to detect it
|
||||
this.$emit("input", e.id);
|
||||
this.lastSelection = e;
|
||||
|
||||
},
|
||||
fetchValueIfNotPresent() {
|
||||
//is there a value that might require fetching?
|
||||
@@ -274,7 +280,9 @@ export default {
|
||||
return Promise.reject(res);
|
||||
}
|
||||
vm.searchResults = res.data;
|
||||
if(vm.allowNoSelection){
|
||||
window.$gz.form.addNoSelectionItem(vm.searchResults, true);
|
||||
}
|
||||
vm.replaceLastSelection();
|
||||
} catch (err) {
|
||||
window.$gz.errorHandler.handleFormError(err);
|
||||
|
||||
Reference in New Issue
Block a user