react-json-tree icon indicating copy to clipboard operation
react-json-tree copied to clipboard

omitted valueGetterFor Number nodetype (numeric values )

Open kikonejacob opened this issue 8 years ago • 4 comments
trafficstars

Node items with numeric value are not rendered as the valueGetter function is not defined. This PR fix this issue by assigning a valueGetter function to nodetype of value "Number"

kikonejacob avatar Mar 06 '17 17:03 kikonejacob

Can you provide an example of failing data?

alexkuz avatar Mar 06 '17 21:03 alexkuz

The compomemt will fail at rendering "timeout" : 5000

[{
  "type": "error",
  "message": "Timeout: Unable to communicate with the parent App",
  "params": {
    "externalCommand": "userPreferences",
    "timeout": 5000
  }
}, {
  "type": "error",
  "message": "Unable to initialize WPF Handler",
  "params": {}
}]

kikonejacob avatar Mar 07 '17 15:03 kikonejacob

Just tried it in example - seems ok to me:

2017-03-07 at 19 06

Are you using the latest version? Maybe there are some render overrides in parent component that lead to it?

alexkuz avatar Mar 07 '17 16:03 alexkuz

This is a weird situation I'm using react-json-tree 0.10.5 This is the message I'm getting :

image

My guess was that the valueGetter was not defined for node of type number.

Ref: react-json-tree/src/JSONNode.js : 53

kikonejacob avatar Mar 07 '17 16:03 kikonejacob