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

Function computeLabel

packages/core/src/mappers/renderer.ts:142–148  ·  view source on GitHub ↗
(
  label: string | undefined,
  required: boolean,
  hideRequiredAsterisk: boolean
)

Source from the content-addressed store, hash-verified

140 * @returns {string} the label string
141 */
142export const computeLabel = (
143 label: string | undefined,
144 required: boolean,
145 hideRequiredAsterisk: boolean
146): string => {
147 return `${label ?? ''}${required && !hideRequiredAsterisk ? '*' : ''}`;
148};
149
150/**
151 * Indicates whether to mark a field as required.

Callers 7

renderMethod · 0.90
RadioGroupFunction · 0.90
ngOnInitFunction · 0.90
renderer.test.tsFile · 0.90
useComputedLabelFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…