-
-
Notifications
You must be signed in to change notification settings - Fork 34
#62 1-indexed arrays #224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#62 1-indexed arrays #224
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements support for 1-indexed arrays by adding an arrayIndexFromOne
option that allows array indices to be displayed starting from 1 instead of 0.
- Adds a new
arrayIndexFromOne
boolean prop to the JsonEditor component with a default value of false - Updates the KeyDisplay component to handle numeric array indices and offset them by 1 when the option is enabled
- Adds a demo checkbox to test the new functionality
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/types.ts | Adds arrayIndexFromOne prop to interfaces |
src/JsonEditor.tsx | Adds default value and passes the prop through |
src/ValueNodeWrapper.tsx | Extracts and passes the prop to KeyDisplay |
src/CollectionNode.tsx | Extracts and passes the prop to KeyDisplay |
src/KeyDisplay.tsx | Implements the 1-indexing logic for numeric keys |
demo/src/App.tsx | Adds demo UI for testing the feature |
README.md | Documents the new prop and adds changelog entry |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Fix #62