score:1

Accepted answer

i was able to accomplish that by adding a property checked to the source of truth (items), and using the selectablegroup handler onselectionfinish which returns an array of selected components (refs)

<selectablegroup ... onselectionfinish={this.handleselectionfinish} />

handleselectionfinish= (obj) => {

        let updateditems = [...this.state.items];

        for (let i = 0; i < updateditems.length; i++) {

            let item= updateditems[i];

            let selecteditem = obj.find(k => k.props.id === item.id)

            item.checked = selecteditem !== undefined;
        }

        this.setstate({ items: updateiitems })
    }


Related Query

More Query from same tag