How to use the @jsonforms/react.withJsonFormsCellProps function in @jsonforms/react

To help you get started, we’ve selected a few @jsonforms/react examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eclipsesource / jsonforms / packages / material / src / cells / MaterialDateCell.tsx View on Github external
return (
    <input value="{data" type="date"> handleChange(path, ev.target.value)}
      className={className}
      id={id}
      disabled={!enabled}
      autoFocus={appliedUiSchemaOptions.focus}
      fullWidth={true}
    /&gt;
  );
};
export const materialDateCellTester: RankedTester = rankWith(2, isDateControl);

export default withJsonFormsCellProps(MaterialDateCell);
github eclipsesource / jsonforms / packages / material / src / cells / MaterialTimeCell.tsx View on Github external
import React from 'react';
import {
  CellProps,
  isTimeControl,
  RankedTester,
  rankWith,
  WithClassname
} from '@jsonforms/core';
import { withJsonFormsCellProps } from '@jsonforms/react';
import { MuiInputTime } from '../mui-controls/MuiInputTime';

export const MaterialTimeCell = (props: CellProps &amp; WithClassname) =&gt; (
  
);
export const materialTimeCellTester: RankedTester = rankWith(2, isTimeControl);
export default withJsonFormsCellProps(MaterialTimeCell);
github eclipsesource / jsonforms / packages / material / src / cells / MaterialIntegerCell.tsx View on Github external
RankedTester,
  rankWith,
  WithClassname
} from '@jsonforms/core';
import { withJsonFormsCellProps } from '@jsonforms/react';
import { MuiInputInteger } from '../mui-controls/MuiInputInteger';

export const MaterialIntegerCell = (props: CellProps &amp; WithClassname) =&gt; (
  
);
export const materialIntegerCellTester: RankedTester = rankWith(
  2,
  isIntegerControl
);

export default withJsonFormsCellProps(MaterialIntegerCell);
github eclipsesource / jsonforms / packages / vanilla / src / cells / TextCell.tsx View on Github external
id={id}
      disabled={!enabled}
      autoFocus={appliedUiSchemaOptions.focus}
      maxLength={appliedUiSchemaOptions.restrict ? maxLength : undefined}
      size={appliedUiSchemaOptions.trim ? maxLength : undefined}
    />
  );
};

/**
 * Default tester for text-based/string controls.
 * @type {RankedTester}
 */
export const textCellTester: RankedTester = rankWith(1, isStringControl);

export default withJsonFormsCellProps(TextCell);
github eclipsesource / jsonforms / packages / material / src / cells / MaterialTextCell.tsx View on Github external
import { MuiInputText } from '../mui-controls/MuiInputText';

export const MaterialTextCell = (props: CellProps &amp; WithClassname) =&gt; (
  
);

/**
 * Default tester for text-based/string controls.
 * @type {RankedTester}
 */
export const materialTextCellTester: RankedTester = rankWith(
  1,
  isStringControl
);

export default withJsonFormsCellProps(MaterialTextCell);
github eclipsesource / jsonforms / packages / vanilla / src / cells / SliderCell.tsx View on Github external
value={data || schema.default}
        onChange={ev =&gt; handleChange(path, Number(ev.target.value))}
        className={className}
        id={id}
        disabled={!enabled}
        autoFocus={uischema.options &amp;&amp; uischema.options.focus}
        style={{ flex: '1' }}
      /&gt;
      <label style="{{">{data || schema.default}</label>
    
  );
};

export const sliderCellTester: RankedTester = rankWith(4, isRangeControl);

export default withJsonFormsCellProps(SliderCell);
github eclipsesource / jsonforms / packages / vanilla / src / cells / BooleanCell.tsx View on Github external
}
        className={className}
        id={id}
        disabled={!enabled}
        autoFocus={uischema.options && uischema.options.focus}
      />
    );
  };

/**
 * Default tester for boolean controls.
 * @type {RankedTester}
 */
export const booleanCellTester: RankedTester = rankWith(2, isBooleanControl);

export default withJsonFormsCellProps(BooleanCell);
github eclipsesource / jsonforms / packages / vanilla / src / cells / NumberFormatCell.tsx View on Github external
id={id}
      disabled={!enabled}
      autoFocus={uischema.options && uischema.options.focus}
      maxLength={uischema.options && uischema.options.restrict ? maxLength : undefined}
      size={uischema.options && uischema.options.trim ? maxLength : undefined}
    />
  );
};

/**
 * Default tester for text-based/string controls.
 * @type {RankedTester}
 */
export const numberFormatCellTester: RankedTester = rankWith(4, isNumberFormatControl);

export default withJsonFormsCellProps(NumberFormatCell);
github eclipsesource / jsonforms / packages / vanilla / src / cells / TextAreaCell.tsx View on Github external
onChange={ev => handleChange(path, ev.target.value)}
      className={className}
      id={id}
      disabled={!enabled}
      autoFocus={uischema.options && uischema.options.focus}
    />
  );
};

/**
 * Tester for a multi-line string control.
 * @type {RankedTester}
 */
export const textAreaCellTester: RankedTester = rankWith(2, isMultiLineControl);

export default withJsonFormsCellProps(TextAreaCell);
github eclipsesource / jsonforms / packages / vanilla / src / cells / TimeCell.tsx View on Github external
value={data || ''}
      onChange={ev => handleChange(path, ev.target.value)}
      className={className}
      id={id}
      disabled={!enabled}
      autoFocus={uischema.options && uischema.options.focus}
    />
  );
};
/**
 * Default tester for date controls.
 * @type {RankedTester}
 */
export const timeCellTester: RankedTester = rankWith(2, isTimeControl);

export default withJsonFormsCellProps(TimeCell);