You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,14 +45,14 @@ Name|Type|Default|Description
45
45
`name`|`string`|"root"|Contains the name of your root node
46
46
`theme`|`string`|"rjv-default"|RJV supports base-16 themes. Check out the [list of supported themes here](https://github.com/gaearon/base16-js/tree/master/src). A custom "rjv-default" theme applies by default.
47
47
`indentWidth`|`integer`|4|Set the indent-width for nested objects
48
-
`collapsed`|`boolean`|`false`|When set to `true`, all nodes will be collapsed by default
48
+
`collapsed`|`boolean` or `integer`|`false`|When set to `true`, all nodes will be collapsed by default. Use an integer value to collapse at a particular depth.
49
49
`collapseStringsAfterLength`|`integer`|`false`|When an integer value is assigned, strings will be cut off at that length. Collapsed strings are followed by an ellipsis. String content can be expanded and collapsed by clicking on the string value.
50
50
`enableClipboard`|`boolean`|`true`|When set to `true`, the user can copy objects and arrays to clipboard
51
51
`displayObjectSize`|`boolean`|`true`|When set to `true`, objects and arrays are labeled with size
52
52
`displayDataTypes`|`boolean`|`true`|When set to `true`, data type labels prefix values
53
+
`onEdit`|`(edit) => {}`|`false`|When a callback function is passed in, `edit` functionality is enabled. The callback is invoked before edits are completed. Returning `false` from `onEdit` will prevent the change from being made. [see: onEdit docs](#onedit-interaction)
53
54
`onAdd`|`(add) => {}`|`false`|When a callback function is passed in, `add` functionality is enabled. The callback is invoked before additions are completed. Returning `false` from `onAdd` will prevent the change from being made.
54
55
`onDelete`|`(delete) => {}`|`false`|When a callback function is passed in, `delete` functionality is enabled. The callback is invoked before deletions are completed. Returning `false` from `onDelete` will prevent the change from being made.
55
-
`onEdit`|`(edit) => {}`|`false`|When a callback function is passed in, `edit` functionality is enabled. The callback is invoked before edits are completed. Returning `false` from `onEdit` will prevent the change from being made. [see: onEdit docs](#onedit-interaction)
56
56
57
57
### Features
58
58
* Object and array nodes can be collapsed and expanded
@@ -148,4 +148,3 @@ I'm also inspired by users who come up with interesting feature requests. Reach
148
148
### To-Do's
149
149
1. Improve documentation for `onAdd` and `onDelete` props
150
150
2. Improve style organization
151
-
3. Support integer input to `collapsed` prop to collapse at a particular depth.
0 commit comments