chore: adjust parameter order (#40252)

This commit is contained in:
lijianan 2023-01-16 16:44:45 +08:00 committed by GitHub
parent 8970f65faf
commit 199c72a212
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,8 +19,8 @@ interface ErrorEntity {
function toErrorEntity(
error: React.ReactNode,
errorStatus: ValidateStatus | undefined,
prefix: string,
errorStatus?: ValidateStatus,
index: number = 0,
): ErrorEntity {
return {
@ -62,9 +62,9 @@ export default function ErrorList({
const debounceErrors = useDebounce(errors);
const debounceWarnings = useDebounce(warnings);
const fullKeyList = React.useMemo(() => {
const fullKeyList = React.useMemo<ErrorEntity[]>(() => {
if (help !== undefined && help !== null) {
return [toErrorEntity(help, helpStatus, 'help')];
return [toErrorEntity(help, 'help', helpStatus)];
}
return [