I want to change the value of a variable that is passed inside the data object when creating a node
const node = [
{
id: '1',
position: { x: 100, y: 350 },
type: 'NeighborSelector',
data: {
values: res.filter(val => val?.policyDisabled === null),
img: cloudzone,
placeholder: 'Please Selet a Zone',
totalIds: 1,
isZone: true,
selectedValue: ''
},
},
setNodes(node);
I want to perform this action in the onChange callback function of that very own node