fix: Pass option as string

This commit is contained in:
Suraj Shetty 2021-04-13 12:03:31 +05:30 committed by GitHub
parent 3d22019b98
commit 7eb3445f57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View file

@ -30,7 +30,9 @@ frappe.ui.form.on('Website Settings', {
},
set_parent_label_options: function(frm) {
frm.fields_dict.top_bar_items.grid.update_docfield_property('parent_label', 'options', frm.events.get_parent_options(frm, "top_bar_items"));
frm.fields_dict.top_bar_items.grid.update_docfield_property(
'parent_label', 'options', frm.events.get_parent_options(frm, "top_bar_items")
);
if ($(frm.fields_dict.top_bar_items.grid.wrapper).find(".grid-row-open")) {
frm.fields_dict.top_bar_items.grid.refresh();
@ -38,7 +40,9 @@ frappe.ui.form.on('Website Settings', {
},
set_parent_label_options_footer: function(frm) {
frm.fields_dict.footer_items.grid.update_docfield_property('parent_label', 'options', frm.events.get_parent_options(frm, "top_bar_items"));
frm.fields_dict.footer_items.grid.update_docfield_property(
'parent_label', 'options', frm.events.get_parent_options(frm, "top_bar_items")
);
if ($(frm.fields_dict.footer_items.grid.wrapper).find(".grid-row-open")) {
frm.fields_dict.footer_items.grid.refresh();

View file

@ -45,7 +45,7 @@ frappe.ui.form.on("Workflow", {
frappe.xcall(get_field_method, { doctype: doc.document_type })
.then(resp => {
frm.fields_dict.states.grid.update_docfield_property(
'update_field', options, [""].concat(resp)
'update_field', 'options', [""].concat(resp)
);
})
}