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

Function withContextToEnumProps

packages/react/src/JsonFormsContext.tsx:659–670  ·  view source on GitHub ↗
(
  Component: ComponentType<ControlProps & OwnPropsOfEnum>
)

Source from the content-addressed store, hash-verified

657 };
658
659const withContextToEnumProps = (
660 Component: ComponentType<ControlProps & OwnPropsOfEnum>
661): ComponentType<OwnPropsOfControl & OwnPropsOfEnum> =>
662 function WithContextToEnumProps({
663 ctx,
664 props,
665 }: JsonFormsStateContext & ControlProps & OwnPropsOfEnum) {
666 const stateProps = ctxToEnumControlProps(ctx, props);
667 const dispatchProps = ctxDispatchToControlProps(ctx.dispatch);
668
669 return <Component {...props} {...dispatchProps} {...stateProps} />;
670 };
671
672const withContextToOneOfEnumCellProps = (
673 Component: ComponentType<EnumCellProps>

Callers 1

withJsonFormsEnumPropsFunction · 0.85

Calls 2

ctxToEnumControlPropsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…