Skip to content

Commit

Permalink
resolve ts issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ethangardner committed Oct 11, 2024
1 parent ef72fa6 commit 9195451
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/design/src/Form/components/Repeater/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { useFieldArray, useForm } from 'react-hook-form';
import { type RepeaterProps } from '@atj/forms';
import { type PatternComponent } from '../../../Form/index.js';
import { type PatternComponent } from '../../index.js';

const Repeater: PatternComponent<RepeaterProps> = props => {
const STORAGE_KEY = `repeater-${props._patternId}`;
Expand Down Expand Up @@ -36,7 +36,7 @@ const Repeater: PatternComponent<RepeaterProps> = props => {
const renderWithUniqueIds = (children: React.ReactNode, index: number) => {
return React.Children.map(children, child => {
if (React.isValidElement(child) && child?.props?.component?.props) {
return React.cloneElement(child, {
return React.cloneElement(child as React.ReactElement, {
component: {
...child.props.component,
props: {
Expand Down

0 comments on commit 9195451

Please sign in to comment.