Notifications
Clear all

[Solved] How to generate link to the model page in ReactJS framework?

1 Posts
2 Users
2 Likes
1,148 Views
1
Topic starter

We can generate the link to any model page using ModelType, ModelLevelType and model JSON in ExtJS.

FieldTypes.getRenderer('modellink', {modelType: 'Shipment', modelLevelType: 'ShipmentHeader'})({value: id, displayValue: val})

 

Is there the same utility in ReactJS framework?

Topic Tags
1 Answer
1

You can use FormattedTypes.render() from @onenetwork-plt/react-components to achieve the same thing. Using your example:

FormattedTypes.render({
  type: 'modellink',
  value: { value: id, displayValue: val },
  props: {
    modelType: 'Shipment',
    modelLevelType: 'ShipmentHeader',
  },
});