Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The Claim module provides by default a "searcher" on id (of course this is not realistic... but this is not the point, here):

The result of the search is a list of claims... in which the Insuree information is contributed by the "insuree" plugin:

extract of ClaimList.js (React Component):
render() {
  const { classes } = this.props;
  return (
    <div className={classes.root}>
      <List component="nav">
        {this.state.claims.map((claim, index) => (
          <ClaimListItem claim={claim} key={`claim${index}`} />
        ))}
      </List>
    </div>
  );
}


extract of ClaimListItem.js (React Component):
render() {
  const { claim } = this.props;
  return (
    <ListItem button onClick={this.handleClick}>
      <ContributedComponent {...claim} contributionKey="claims.claim.listItem">
        <ListItemText primary={`${claim.declaration_date} [${claim.id}]`}  />
      </ContributedComponent>
    </ListItem>
  );
}
  • No labels