Skip to content

Commit

Permalink
fix(Form): type
Browse files Browse the repository at this point in the history
  • Loading branch information
Pilotager committed Sep 22, 2024
1 parent 6a25d48 commit f58c1f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion packages/core/src/form/control/form-control-handlers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ registerFormControlHandler(
| SliderProps
| StepperProps
| UploaderProps
> {
>
{
doControlRender(
element: ReactElement<
| CheckboxGroupProps
Expand All @@ -144,6 +145,7 @@ registerFormControlHandler(
value: valueProp ?? value,
disabled: disabled ?? disabledProp,
onChange: (nextValue: any) => {
// @ts-ignore
onChange?.(nextValue)
onDelegatingChange?.(nextValue)
},
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/uploader/uploader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ interface UseUploadFilesRenderProps {
multiple?: boolean
maxFiles?: number
children?: ReactNode
onChange?(file:UploadFile | UploadFile[]): void
onChange?(file: UploadFile | UploadFile[]): void
}

function UploadFilesRender(props: UseUploadFilesRenderProps): JSX.Element {
Expand Down Expand Up @@ -114,7 +114,7 @@ interface BaseUploaderProps extends ViewProps {
removable?: boolean
children?: ReactNode
onUpload?(): void
onChange?(file: UploadFile & undefined | UploadFile[] & undefined): void
onChange?(file: (UploadFile & undefined) | (UploadFile[] & undefined)): void
}

export type UploaderProps = BaseUploaderProps
Expand Down

0 comments on commit f58c1f7

Please sign in to comment.