Skip to content
This repository was archived by the owner on Mar 19, 2025. It is now read-only.
This repository was archived by the owner on Mar 19, 2025. It is now read-only.

Unsupported 'inner component' mounting when root is DocumentFragment #29

Description

@jaandrle

els[all_els_counter]= mount(getParentElement());

probably because of:

if(!record.removedNodes||Array.prototype.indexOf.call(record.removedNodes, container)===-1) return false;

/**
 * @param {object} def
 * @param {T_BarChartRecord[]} def.data
 * @param {T_BarChartUnit} def.unit
 * @param {number} def.max
 * @param {T_BarChartSection} [def.section]
 * @param {KomponentaTap} [def.ontap]
 */
function barChartComponent({ data, unit, max, section, ontap }){
    const { add, component, setShift, share }= $dom.component("<>");
    if(section)
        component(barChartSectionComponent(section));
    else
        add("p", { textContent: "Tap item for more details." });
    
        add("div", { className: "borderT__H_1 marginT__1 paddingT__1" }, section ? -100 : -1);
            setShift(0);
    for(const line of data)
            component(barCharLineComponent({ line, unit, max, ontap }), -1);
        add("p", { textContent: "Items with no value are hidden.", className: "marginT__1 color__N4" }, -2);
    return share;
}
function barChartSectionComponent({ name, type }){
	  const type_to_text= type==="bucket" ? "Bucket" : "Measure";
	  const { add, share }= $dom.component("p", { textContent: `Selected ${type_to_text}: ` });
	      add("strong", { textContent: name });
      return share;
}

… generates correct output, but after mounting barChartComponent, the barChartSectionComponent disapear!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions