Skip to content

Commit

Permalink
chore: compatible for @types/react18
Browse files Browse the repository at this point in the history
  • Loading branch information
miracles1919 committed Apr 9, 2022
1 parent 680af1c commit dd0199e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/date-picker/date-picker.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { FC, ReactNode, useCallback, useMemo } from 'react'
import { useMemoizedFn } from 'ahooks'
import Picker from '../picker'
import type { PickerProps, PickerValue } from '../picker'
import type { PickerProps, PickerValue, PickerColumn } from '../picker'
import { NativeProps, withNativeProps } from '../../utils/native-props'
import { mergeProps } from '../../utils/with-default-props'
import { usePropsValue } from '../../utils/use-props-value'
Expand Down Expand Up @@ -86,7 +86,7 @@ export const DatePicker: FC<DatePickerProps> = p => {
props.onSelect?.(date)
})

const columns = useCallback(
const columns = useCallback<(value: PickerValue[]) => PickerColumn[]>(
selected =>
generateDatePickerColumns(
selected as string[],
Expand Down
2 changes: 1 addition & 1 deletion src/components/form/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const Form = forwardRef<FormInstance, FormProps>((p, ref) => {
)
items = []
}
traverseReactNode(props.children, child => {
traverseReactNode(props.children as ReactNode, child => {
if (React.isValidElement(child)) {
if (child.type === Header) {
collect()
Expand Down

0 comments on commit dd0199e

Please sign in to comment.