Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CombineErrors

将多个 model 的错误组合显示,只会显示收到的第一个错误 Combines error of multiple models, only one at a moment.

Hierarchy

Index

Constructors

constructor

Properties

context

context: IFormContext

Readonly props

props: Readonly<ICombineErrorsProps> & Readonly<{ children?: ReactNode }>

refs

refs: {}

Type declaration

  • [key: string]: ReactInstance

state

state: ICombineErrorState = ...

Static contextType

contextType: Context<IFormContext> = ...

Methods

Optional UNSAFE_componentWillMount

  • UNSAFE_componentWillMount(): void

Optional UNSAFE_componentWillReceiveProps

  • UNSAFE_componentWillReceiveProps(nextProps: Readonly<ICombineErrorsProps>, nextContext: any): void

Optional UNSAFE_componentWillUpdate

Optional componentDidCatch

  • componentDidCatch(error: Error, errorInfo: ErrorInfo): void
  • Catches exceptions generated in descendant components. Unhandled exceptions will cause the entire component tree to unmount.

    Parameters

    • error: Error
    • errorInfo: ErrorInfo

    Returns void

componentDidMount

  • componentDidMount(): void

componentDidUpdate

Optional componentWillMount

  • componentWillMount(): void

Optional componentWillReceiveProps

componentWillUnmount

  • componentWillUnmount(): void

Optional componentWillUpdate

forceUpdate

  • forceUpdate(callback?: () => void): void
  • Parameters

    • Optional callback: () => void
        • (): void
        • Returns void

    Returns void

Optional getSnapshotBeforeUpdate

  • Runs before React applies the result of render to the document, and returns an object to be given to componentDidUpdate. Useful for saving things such as scroll position before render causes changes to it.

    Note: the presence of getSnapshotBeforeUpdate prevents any of the deprecated lifecycle events from running.

    Parameters

    Returns any

render

  • render(): ReactNode

setError

setState

shouldComponentUpdate

subscribe

  • subscribe(): void

unsubscribe

  • unsubscribe(): void

Generated using TypeDoc