-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Description
Description:
When rendering a large array in react-json-view, the collapsed view shows incorrect index ranges if the array is split into chunks.
Steps to Reproduce:
- Render an array with 200 elements using react-json-view.
- Collapse the array so that values are shown in chunked ranges (e.g., 100 items per chunk).
- Observe the displayed index ranges.
Actual Behavior:
The ranges are displayed as:
0 to 100 100 to 200
However, this is misleading:
- 0 to 100 suggest 100 items, but index 100 does not exist.
- 100 to 200 also suggests 100 items, but index 200 does not exist (last valid index is 199).
Expected Behavior:
Ranges should correctly display index bounds, for example:
0 to 99 100 to 199
Additional Context:
The mismatch can cause confusion when working with large datasets since the displayed ranges don’t match actual array indexes.

Metadata
Metadata
Assignees
Labels
No labels