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

adaptive-table recursion level limited to 2 ? #103

Open
Ognian opened this issue Sep 28, 2013 · 3 comments
Open

adaptive-table recursion level limited to 2 ? #103

Ognian opened this issue Sep 28, 2013 · 3 comments

Comments

@Ognian
Copy link
Contributor

Ognian commented Sep 28, 2013

Hi,
is there a reason why the recursion level is limited here?
https://github.com/geraintluff/jsonary/blob/master/renderers/contributed/adaptive-table.js#L86

I have deeper levels, so I've removed this…
Is it OK for you to remove this check?

Ognian

@geraintluff
Copy link
Contributor

There has to be some limit, but it doesn't have to be 2 levels.

What happened was that I attempted to render a JSON Schema object - this is, of course, recursive, so it got locked in a loop, creating columns for subschemas of subschemas, etc.

The level could easily be raised - or perhaps specified using a displayAsTableDepth parameter?

@Ognian
Copy link
Contributor Author

Ognian commented Oct 2, 2013

You are right, a displayAsTableDepth parameter would be OK, but if this limit is reached we should also somehow show this to the user, like "nesting too deep" instead of the link. The default level should be something like 5 or 10, what do you think?

@geraintluff
Copy link
Contributor

Ah - collapsing the display, instead of rendering the data in non-array mode. That's a good idea. :)

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