Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6212

Update child class element based on id in react

$
0
0

I have a interface.

  export interface DefaultFormList {  defaultFormItems?: DefaultFormItems[];  }

and

export interface DefaultFormItems {  id: string;  name: string;  formXml: string,  isDefaultFormEnable: boolean;}

I want to update the formXml based on particular id, rest don't need to change.

Below is the code snippet where i try to update the formXml based on formId.

How I can proceed further, below lines are only for reference.

  const updatedDefautItems: DefaultFormItems[] = { ...this.state.defaultFormList.defaultFormItems,   formXml: updatedFormXmlString };

Viewing all articles
Browse latest Browse all 6212

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>