const Page = require('frappejs/client/view/page'); const view = require('frappejs/client/view'); module.exports = class FormPage extends Page { constructor(doctype) { let meta = frappe.get_meta(doctype); super(`List ${meta.name}`); this.list = new (view.get_list_class(doctype))({ doctype: doctype, parent: this.body }); page.on('show', async () => { await page.list.run(); }); } }