Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CombineErrors<SS>

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

Type parameters

  • SS

Hierarchy

Index

Constructors

constructor

Properties

Private $

$: Subscription | null = null

Private $parent

$parent: Subscription | null = null

context

context: IFormContext

Readonly props

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

refs

refs: {}

Type declaration

  • [key: string]: ReactInstance

Static contextType

contextType: Context<IFormContext> = FormContext

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 SS | null

Private parentChildrenChange

  • parentChildrenChange(name: string): void

render

  • render(): {}

setError

setState

shouldComponentUpdate

subscribe

  • subscribe(): void

unsubscribe

  • unsubscribe(): void

Object literals

state

state: object

error

error: null = null

Generated using TypeDoc