Below is my state object
{
"customerdata":[
{
"name":"COMPANYNAME",
"title":"Company Name",
"isvisible":false,
"Attrib":{
"caption":"",
"TextWrap":"",
"Bold":false,
"Italic":false,
"Font Name":"",
"FontSize":"",
"FontColor":"",
"BackGroundColor":"",
"Height":"",
"Width":""
}
},
{
"name":"CONTACT_FULL_NAME",
"title":"Contact Name",
"isvisible":false,
"Attrib":{
"caption":"",
"TextWrap":"",
"Bold":false,
"Italic":false,
"Font Name":"",
"FontSize":"",
"FontColor":"",
"BackGroundColor":"",
"Height":"",
"Width":""
}
},
{
"name":"PHONENUMBER",
"title":"Phone Number",
"isvisible":false,
"Attrib":{
"caption":"",
"TextWrap":"",
"Bold":false,
"Italic":false,
"Font Name":"",
"FontSize":"",
"FontColor":"",
"BackGroundColor":"",
"Height":"",
"Width":""
}
},
{
"name":"INDUSTRYTYPE",
"title":"Industry Type",
"isvisible":false,
"Attrib":{
"caption":"",
"TextWrap":"",
"Bold":false,
"Italic":false,
"Font Name":"",
"FontSize":"",
"FontColor":"",
"BackGroundColor":"",
"Height":"",
"Width":""
}
},
{
"name":"ADDRESS_CITY",
"title":"Address City",
"isvisible":false,
"Attrib":{
"caption":"",
"TextWrap":"",
"Bold":false,
"Italic":false,
"Font Name":"",
"FontSize":"",
"FontColor":"",
"BackGroundColor":"",
"Height":"",
"Width":""
}
},
{
"name":"FOLLOWUP",
"title":"Follow Up",
"isvisible":false,
"Attrib":{
"caption":"",
"TextWrap":"",
"Bold":false,
"Italic":false,
"Font Name":"",
"FontSize":"",
"FontColor":"",
"BackGroundColor":"",
"Height":"",
"Width":""
}
},
{
"name":"IID",
"title":"IID",
"isvisible":false,
"Attrib":{
"caption":"",
"TextWrap":"",
"Bold":false,
"Italic":false,
"Font Name":"",
"FontSize":"",
"FontColor":"",
"BackGroundColor":"",
"Height":"",
"Width":""
}
},
{
"name":"HASMORELINKS",
"title":"Has More Links",
"isvisible":false,
"Attrib":{
"caption":"",
"TextWrap":"",
"Bold":false,
"Italic":false,
"Font Name":"",
"FontSize":"",
"FontColor":"",
"BackGroundColor":"",
"Height":"",
"Width":""
}
},
{
"name":"ISNEWOREDITED",
"title":"Is Now Order",
"isvisible":false,
"Attrib":{
"caption":"",
"TextWrap":"",
"Bold":false,
"Italic":false,
"Font Name":"",
"FontSize":"",
"FontColor":"",
"BackGroundColor":"",
"Height":"",
"Width":""
}
},
{
"name":"BASECURRENCYIID",
"title":"Base Currency",
"isvisible":false,
"Attrib":{
"caption":"",
"TextWrap":"",
"Bold":false,
"Italic":false,
"Font Name":"",
"FontSize":"",
"FontColor":"",
"BackGroundColor":"",
"Height":"",
"Width":""
}
}
],
"isAttrcall":true,
"linedata":{
"name":"COMPANYNAME",
"title":"Company Name",
"isvisible":false,
"Attrib":{
"caption":"",
"TextWrap":"",
"Bold":false,
"Italic":false,
"Font Name":"",
"FontSize":"",
"FontColor":"",
"BackGroundColor":"",
"Height":"",
"Width":""
}
}
}
I am passing one 0th index data to another component, there I am updating the value and return the updated value back to main component.
{
"name":"COMPANYNAME",
"title":"Company Name",
"isvisible":false,
"Attrib":{
"caption":"adasd",
"TextWrap":"",
"Bold":false,
"Italic":false,
"Font Name":"",
"FontSize":"",
"FontColor":"",
"BackGroundColor":"",
"Height":"",
"Width":""
}
}
how i can update back the main state?
in this example I updated caption to 'adasd'.
help needed...
i tried to print the console log in main component i can see the values.
this is the data from child component
{
"_state": {
"data": {
"linedata": {
"name": "COMPANYNAME",
"title": "Company Name",
"isvisible": false,
"Attrib": {
"caption": "adasd",
"TextWrap": "",
"Bold": false,
"Italic": false,
"Font Name": "",
"FontSize": "",
"FontColor": "",
"BackGroundColor": "",
"Height": "",
"Width": ""
}
}
}
}
}