feat: min lines for ace editor
This commit is contained in:
parent
e77fd18cec
commit
eb37566ac0
1 changed files with 6 additions and 2 deletions
|
|
@ -18,8 +18,12 @@ frappe.ui.form.ControlCode = class ControlCode extends frappe.ui.form.ControlTex
|
|||
const ace = window.ace;
|
||||
this.editor = ace.edit(this.ace_editor_target.get(0));
|
||||
|
||||
if (this.df.max_lines)
|
||||
this.editor.setOption("maxLines", this.df.max_lines);
|
||||
if (this.df.max_lines || this.df.min_lines) {
|
||||
if (this.df.max_lines)
|
||||
this.editor.setOption("maxLines", this.df.max_lines);
|
||||
if (this.df.min_lines)
|
||||
this.editor.setOption("minLines", this.df.min_lines);
|
||||
}
|
||||
else {
|
||||
this.expanded = false;
|
||||
this.$expand_button = $(`<button class="btn btn-xs btn-default">${this.get_button_label()}</button>`).click(() => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue