MCPcopy Create free account
hub / github.com/eclipsesource/jsonforms / createDefaultValue

Function createDefaultValue

packages/core/src/mappers/renderer.ts:169–177  ·  view source on GitHub ↗
(
  schema: JsonSchema,
  rootSchema: JsonSchema
)

Source from the content-addressed store, hash-verified

167 * @returns {any}
168 */
169export const createDefaultValue = (
170 schema: JsonSchema,
171 rootSchema: JsonSchema
172) => {
173 const defaultValue = doCreateDefaultValue(schema, rootSchema);
174
175 // preserve the backward compatibility where it is returning an empty object if we can't determine the default value
176 return defaultValue === undefined ? {} : defaultValue;
177};
178
179/**
180 * Create a default value based on the given schema.

Callers 12

renderMethod · 0.90
ArrayControlFunction · 0.90
renderer.test.tsFile · 0.90
addMethod · 0.90
addMethod · 0.90
onAddClickMethod · 0.90
MaterialAnyOfRendererFunction · 0.90
openNewTabFunction · 0.90
openNewTabFunction · 0.90
TableToolbar.tsxFile · 0.90

Calls 1

doCreateDefaultValueFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…