I have this function working outside of the class App extends Component, but I want to move it inside since I can’t call an inner function from the outside:
function moveToSelection(selected){
for(let indexPath of selected){
indexSet.add(indexPath.index);
}
console.log(indexSet);
}
I am triggering it here:
<TableView
columns={COLUMNS}
dataSource={ds}
renderCell={renderCell}
onSelectionChange={moveToSelection}
/ >
I tried just removing the “function” deceleration when moving it inside, but there seems to be more involved?