Skip to content
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

how to expand at a particular object/array index #10

Open
nelsieborja opened this issue Aug 14, 2023 · 1 comment
Open

how to expand at a particular object/array index #10

nelsieborja opened this issue Aug 14, 2023 · 1 comment

Comments

@nelsieborja
Copy link

nelsieborja commented Aug 14, 2023

Is there a way to support expanding at a particular index?

Given the following values:

// Array
[
  {"key0": {...} },
  {"key1": {...} },
]

// Object
{
  "key0": {
    "key0": {...},
    "key1": {...}
  } ,
  "key1": "value1" ,
}

// Mixed
{
  "key0": [
    {...},
  ],
  "key1": "value1" ,
}

Say I want the first entry from the first level to be expanded, would it be possible to achieve this by passing something like expanded={1.1}?

@jaywcjlove
Copy link
Member

@nelsieborja Do you want to collapse an object or array by default?

/** When set to true, all nodes will be collapsed by default. Use an integer value to collapse at a particular depth. @default false */
collapsed?: boolean | number;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants