Skip to content

Checkbox not checked in issue #397

@niku2021

Description

@niku2021

I tried this sample without extend component. So i need to get onchecked event using const value like below. I am new to react But my requirement to not use extend component.

const stateLod = {
    checked: [],
    expanded: [],
    data : [],  
    setDataLoad:null
}

 <CheckboxTree    
                    nodes={listItems}
                    iconsClass="fa5"
                    checked={stateLod.checked}
                    data={classData}
                    onCheck={(checked) => 
                     stateLod.checked={checked}
                      } 
       /> 

Do you any suggestion for this issue,

also I tried this way.

function setCheckedNodes(checked){ 
    return true;
}

 <CheckboxTree    
                    nodes={listItems}
                    iconsClass="fa5"
                    checked={stateLod.checked}
                    data={classData}
                   onCheck={(checked) => setCheckedNodes(checked)}
                      } 
       /> 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions