I am trying to set initial value in Hardcoded Values Editor, but it does not seem to work.
And I cannot find any OnInitialize event, where I could set the value.
any idea how to do it?
@Serenity.Decorators.registerEditor()
export class PatternSearchEditor extends Serenity.Select2Editor<any, any> {
constructor(container: JQuery) {
super(container, null);
// add option accepts a key (id) value and display text value
this.addOption("s", "starts with");
this.addOption("%", "includes");
this.addOption("|", "ends with");
//this does not work
this.set_value("s");
}
Try using this.value = "S" instead of this.set_values
OMFG! I must have been stoned or braindead. I would swear it did not work when I tried it the first time.
WORKS NOW, THX @Estrusco