feat(json-schema-2020-12): add support for defaultExpandedLevels opt
optimizeExpansion config option was introduced as well to support rendering extensive or very complex schemas. Refs #8513
This commit is contained in:
committed by
Vladimír Gorej
parent
fa829e3368
commit
7c15f509b7
@@ -88,6 +88,23 @@ export const withJSONSchemaContext = (Component, overrides = {}) => {
|
||||
},
|
||||
config: {
|
||||
default$schema: "https://json-schema.org/draft/2020-12/schema",
|
||||
/**
|
||||
* Defines an upper exclusive boundary of the level range for automatic expansion.
|
||||
*
|
||||
* 0 -> do nothing
|
||||
* 1 -> [0]...(1)
|
||||
* 2 -> [0]...(2)
|
||||
* 3 -> [0]...(3)
|
||||
*/
|
||||
defaultExpandedLevels: 0, // 2 = 0...2
|
||||
/**
|
||||
* Can be turned on for complex and extensive schemas.
|
||||
* Child schemas are not rendered until parent schema is expanded.
|
||||
*
|
||||
* By default, entire schema tree is rendered and collapsed parts of the
|
||||
* tree are hidden with css.
|
||||
*/
|
||||
optimizeExpansion: false,
|
||||
...overrides.config,
|
||||
},
|
||||
fn: {
|
||||
|
||||
Reference in New Issue
Block a user