A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/Lapple/react-json-inspector below:

Lapple/react-json-inspector: React JSON inspector component

React JSON Inspector Component

React-based JSON inspector that features tree expansion and fast search.

Live demo

npm install react-json-inspector
var Inspector = require('react-json-inspector');
var data = { /* ... */ };

React.render(
    <Inspector data={ data } />,
    document.getElementById('inspector')
);

Make sure to include json-inspector.css in your stylesheet. Feel free to override or amend default styles, for instance, when using a dark background.

cd /path/to/project
npm install
npm run watch

Then, visit http://localhost/path/to/project/example

The only required propery, JSON object or array to inspect.

The class name to be added to the root component element.

Search bar component that accepts onChange, data and query properties. Defaults to built-in search bar. Pass false to disable search.

Optional parameters for search (toolbar). Must be an object.

Optional initial search query, defaults to an empty string.

Pass component factory that would receive the following properties:

Can be used to create custom input fields for JSON property names and primitive values, see #3 for more information.

Callback to be run whenever any key-value pair is clicked. Receives an object with key, value and path properties.

Function to check whether the entered search term is sufficient to query data. Defaults to (query) => query.length >= 2.

Optional predicate that can determine whether the leaf node should be expanded on initial render. Receives two arguments: keypath and value. Defaults to (keypath, query) => false.

Optional parameters for filterer (search). Must be an object.

props.verboseShowOriginal

Set to true for full showOriginal expansion of children containing search term. Defaults to false.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4