Closed emilyo9264 closed 5 months ago
import JsonView from "@uiw/react-json-view"; const example = { nestedArray: [], object: {}, }; export default function App() { return ( <JsonView value={example}> <JsonView.KeyName as="span" render={({ style, onClick, ...props }, { keyName, keys }) => { console.log(keyName, keys); // keys undefined return ( <span {...props} style={{ ...style, backgroundColor: "red" }} /> ); }} /> </JsonView> ); }
Expected from the console:
nestedArray ["nestedArray"] object ["object"]
Actual:
nestedArray undefined object undefined
Code sandbox minimal example to reproduce: https://codesandbox.io/p/sandbox/lingering-butterfly-4sc9kd
@emilyo9264 Upgrade v2.0.0-alpha.22
v2.0.0-alpha.22
Expected from the console:
Actual:
Code sandbox minimal example to reproduce: https://codesandbox.io/p/sandbox/lingering-butterfly-4sc9kd