class DetailedListComponent { constructor(parent, df) { this.parent = parent; this.df = df || {}; this.make(); } make() { this.wrapper = $( `
`, ).appendTo(this.parent); let brief_section = $( `
`, ).appendTo(this.wrapper); $(`
`).appendTo(this.wrapper); let detailed_section = $( `
`, ).appendTo(this.wrapper); new SectionHead(brief_section, this.df); new SectionHead(detailed_section, { description: 'Nothing selected', }); new ListComponent(brief_section, { data: this.df.data, template: this.df.template, onclick: (index) => { clear_wrapper(detailed_section); this.df.onclick(index, detailed_section); }, }); } }