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: docs/pages/index.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -97,15 +97,15 @@ Check the [source code](https://github.com/TexteaInc/json-viewer/blob/main/docs/
97
97
|`onCopy`|`(path, value, copy) => void`| - | Callback when value copied, you can use it to customize the copy behavior.<br />\*Note: you can use the third argument `copy` to copy string to clipborad. |
98
98
|`onSelect`|`(path, value) => void`| - | Callback when value selected. |
|`editable`|`boolean`\|<br />`(path, currentValue) => boolean`|`false`| Whether enable edit feature. You can pass a function to customize the result. |
100
+
|`editable`|`boolean`\|<br />`(path, currentValue) => boolean`|`false`| Whether enable edit feature. Provide a function to customize this behavior by returning a boolean based on the value and path.|
101
101
|`defaultInspectDepth`|`number`| 5 | Default inspect depth for nested objects.<br /><br />_\* If the number is set too large, it could result in performance issues._|
102
102
|`maxDisplayLength`|`number`| 30 | Hide items after reaching the count.<br />`Array` and `Object` will be affected.<br /><br />_\* If the number is set too large, it could result in performance issues._|
103
103
|`groupArraysAfterLength`|`number`| 100 | Group arrays after reaching the count.<br />Groups are displayed with bracket notation and can be expanded and collapsed by clicking on the brackets. |
104
104
|`collapseStringsAfterLength`|`number`| 50 | Cut off the string after reaching the count. Collapsed strings are followed by an ellipsis.<br /><br />String content can be expanded and collapsed by clicking on the string value. |
105
105
|`objectSortKeys`|`boolean`|`false`| Whether sort keys through `String.prototype.localeCompare()`|
106
106
|`quotesOnKeys`|`boolean`|`true`| Whether add quotes on keys. |
107
107
|`displayDataTypes`|`boolean`|`true`| Whether display data type labels. |
108
-
|`displayObjectSize`|`boolean`|`true`| Whether display the size of array and object. |
108
+
|`displaySize`|`boolean`\|<br />`(path, currentValue) => boolean`|`true`| Whether display the size of `Object`, `Array`, `Map`and `Set`. Provide a function to customize this behavior by returning a boolean based on the value and path.|
109
109
|`highlightUpdates`|`boolean`|`true`| Whether to highlight updates. |
110
110
111
111
#### Mapping from [`mac-s-g/react-json-view`](https://github.com/mac-s-g/react-json-view)
0 commit comments