This commit is contained in:
@@ -41,6 +41,8 @@ import _ from "../libs/lodash.min.js";
|
||||
/*
|
||||
|
||||
todo: set actual seleted ID value from our local selected whole object so outer form just gets id
|
||||
todo: needs to fill in the selected value when the form opens regardless of what any other setting is, in other words it needs to ensure the pre-selected
|
||||
value is in the list
|
||||
todo test multiple selection
|
||||
todo: option to display icon to open the record selected, (we have the type and the id and in v7 you could click on most titles to navigate to that record)
|
||||
if I add that then maybe need a "new" option on edit forms because it's a two step way to get to adding a new one of whatever it is without having to go
|
||||
@@ -60,9 +62,11 @@ export default {
|
||||
} else {
|
||||
if (vm.noSelectionValid) {
|
||||
window.$gz.form.addNoSelectionItem(vm.searchResults);
|
||||
if (vm.value == null) {
|
||||
vm.value = 0;
|
||||
}
|
||||
// debugger;
|
||||
|
||||
//TODO: this may be needed to force new records to have a zero in their no selection valid fields rather than null
|
||||
// however it could overwrite a valid value maybe so needs further testing
|
||||
//this.$emit("input", 0);
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -90,7 +94,7 @@ export default {
|
||||
props: {
|
||||
// value: {
|
||||
// type: Number,
|
||||
// default: 0
|
||||
// default: null
|
||||
// },
|
||||
ayaType: {
|
||||
type: Number,
|
||||
@@ -131,12 +135,18 @@ export default {
|
||||
//console.log("WATCH::SEARCHENTRY doing search now");
|
||||
this.doSearch();
|
||||
},
|
||||
value(val) {
|
||||
//this ensures the parent form gets the onchange event
|
||||
//not actually sure why there are two here but it worked with the datetime picker so I replicated it here
|
||||
//To answer above it appears both are necessary for proper operation
|
||||
this.$emit("input", val);
|
||||
this.$emit("change", val);
|
||||
// value(val) {
|
||||
// //this ensures the parent form gets the onchange event
|
||||
// //not actually sure why there are two here but it worked with the datetime picker so I replicated it here
|
||||
// //To answer above it appears both are necessary for proper operation
|
||||
// this.$emit("input", val);
|
||||
// this.$emit("change", val);
|
||||
// },
|
||||
selected(val) {
|
||||
if (val && val.id) {
|
||||
this.$emit("input", val.id);
|
||||
//this.$emit("change", val.id);
|
||||
}
|
||||
},
|
||||
errors(val) {
|
||||
if (this.hasError()) {
|
||||
|
||||
@@ -49,7 +49,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
selectedWidget: null,
|
||||
selectedUser: null
|
||||
selectedUser: 1
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
||||
Reference in New Issue
Block a user