react-json-view
react-json-view copied to clipboard
Add onSelect feature from react-json-view
react-json-view has the onSelect prop, it takes a function, clicking a value triggers that function.
@Bushstar You can achieve a similar onSelect effect using the Row component:
<Row onClick={() => { }} />
That would be great. Does this usage look correct?
const Row = JsonView.Row;
return (
<JsonView
value={data}
>
<Row onSelect={(params) => {
console.log(params);
}} />
</JsonView>
);
@Bushstar You can try running the example; it looks fine.
https://github.com/uiwjs/react-json-view/blob/3208d8269950a17463b9688dc9d7bac9af89aae5/core/README.md?plain=1#L379-L430