Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{items.map((item, index) => {
// This is largely copied from the default ArrayField
const itemSchema = this.getItemSchema(index);
const itemIdPrefix = `${idSchema.$id}_${index}`;
const itemIdSchema = toIdSchema(itemSchema, itemIdPrefix, definitions);
const isLast = items.length === (index + 1);
const isEditing = this.state.editing[index];
const notLastOrMultipleRows = !isLast || items.length > 1;
if (isReviewMode ? isEditing : isLast || isEditing) {
return (
<div>
<element name="{`table_${itemIdPrefix}`}/">
<div>
<div>
{isLast && items.length > 1 && uiSchema['ui:options'].itemName
? <h5>New {uiSchema['ui:options'].itemName}</h5>
: null}
<div>
</div></div></div></element></div>
{items.map((item, index) => {
// This is largely copied from the default ArrayField
const itemSchema = this.getItemSchema(index);
const itemIdPrefix = `${idSchema.$id}_${index}`;
const itemIdSchema = toIdSchema(
itemSchema,
itemIdPrefix,
definitions,
);
const isLast = items.length === index + 1;
const isEditing = this.state.editing[index];
const notLastOrMultipleRows = !isLast || items.length > 1;
if (isReviewMode ? isEditing : isLast || isEditing) {
return (
<div></div>
{items.map((item, index) => {
const itemSchema = this.getItemSchema(index);
const itemIdPrefix = `${idSchema.$id}_${index}`;
const itemIdSchema = toIdSchema(itemSchema, itemIdPrefix, definitions);
return (
<div>
<element name="{`table_${itemIdPrefix}`}/">
<div>
<div>
this.onItemChange(index, value)}
onBlur={onBlur}
registry={this.props.registry}
required={false}</div></div></element></div>
{items.map((item, index) => {
const itemSchema = this.getItemSchema(index);
const itemIdPrefix = `${idSchema.$id}_${index}`;
const itemIdSchema = toIdSchema(itemSchema, itemIdPrefix, definitions);
const itemData = items[index];
const isEditing = this.state.editStates[index];
if (isEditing) {
return (
<div>
<element name="{`additional_${index}`}/">
<div>
<div>
<h5>Additional source</h5>
<div>
</div></div></div></element></div>
{items.map((item, index) => {
const itemSchema = this.getItemSchema(index);
const itemIdPrefix = `${idSchema.$id}_${index}`;
const itemIdSchema = toIdSchema(itemSchema, itemIdPrefix, definitions);
return (
<div>
<div>
<div>
<h5>{uiOptions.itemName}</h5>
f}
onBlur={f => f}
registry={this.props.registry}
required={false}</div></div></div>
{items.map((item, index) => {
const itemSchema = this.getItemSchema(index);
const itemIdPrefix = `${idSchema.$id}_${index}`;
const itemIdSchema = toIdSchema(
itemSchema,
itemIdPrefix,
definitions,
);
const itemData = items[index];
const isEditing = this.state.editStates[index];
if (isEditing) {
return (
<div>
<element name="{`additional_${index}`}">
<div>
<div></div></div></element></div>
{items.map((item, index) => {
const itemSchema = this.getItemSchema(index);
const itemIdPrefix = `${idSchema.$id}_${index}`;
const itemIdSchema = toIdSchema(
itemSchema,
itemIdPrefix,
definitions,
);
const isLast = items.length === index + 1;
const isEditing = this.state.editing[index];
if (isEditing) {
return (
<div>
<element name="{`table_${itemIdPrefix}`}">
<div>
<div>
{isLast &&
items.length > 1 &&
uiSchema['ui:options'].itemName ? (</div></div></element></div>