Using Editor 2.4.1, I am attempting to set a default value for the tags
. My initial attempt was to simply use the option def as below:
{ label: "Branch Size", name: "Branches.BranchSize_Id", type: "tags", multiple: false, def: modelID }
This results in the field simply stuck on the processing icon, and not displaying the value:
So I figured maybe def isn't supported, and attempted the following code to set the value using the initCreate
event as below:
editor.on("initCreate", function () {
this.set("Branches.BranchSize_Id", modelID);
console.log(editor.field("Branches.BranchSize_Id").val());
});
However, this results in the same behavior.
Interestingly if I write the value of the field in either situation...it appears that it did set and returns the value. It just doesn't seem to update the display.
Backend code for the options is simple enough, and the value being set is a valid value in the list:
editor.Field(
new Field("Branches.BranchSize_Id").Options(
new Options().Table("BranchSizes")
.Value("Id")
.Label("Name")
.Where(q => q.Where("InactiveDate", null)).
Order(false)).
SetFormatter(Format.NullEmpty()))
;
Thanks for your assistance