Options
All
  • Public
  • Public/Protected
  • All
Menu

Search bar VDOM component.

Hierarchy

Index

Constructors

constructor

  • Parameters

    Returns SearchBar

Properties

context

context: any

If using the new style context, re-declare this in your class to be the React.ContextType of your static contextType. Should be used with type annotation or static contextType.

static contextType = MyContext
// For TS pre-3.7:
context!: React.ContextType<typeof MyContext>
// For TS 3.7 and above:
declare context: React.ContextType<typeof MyContext>
see

https://reactjs.org/docs/context.html

handleChange

handleChange: (e: React.FormEvent<HTMLElement>) => void

Handler for search input changes.

Type declaration

    • (e: React.FormEvent<HTMLElement>): void
    • Parameters

      • e: React.FormEvent<HTMLElement>

      Returns void

Readonly props

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

refs

refs: {}

Type declaration

state

state: Readonly<S>

Optional Static contextType

contextType: Context<any>

If set, this.context will be set at runtime to the current value of the given Context.

Usage:

type MyContext = number
const Ctx = React.createContext<MyContext>(0)

class Foo extends React.Component {
  static contextType = Ctx
  context!: React.ContextType<typeof Ctx>
  render () {
    return <>My context's value: {this.context}</>;
  }
}
see

https://reactjs.org/docs/context.html#classcontexttype

Methods

Optional UNSAFE_componentWillMount

UNSAFE_componentWillMount:

Optional UNSAFE_componentWillReceiveProps

UNSAFE_componentWillReceiveProps:

Optional UNSAFE_componentWillUpdate

UNSAFE_componentWillUpdate:

Optional componentDidCatch

componentDidCatch:

Optional componentDidMount

componentDidMount:

Optional componentDidUpdate

componentDidUpdate:

Optional componentWillMount

componentWillMount:

Optional componentWillReceiveProps

componentWillReceiveProps:

Optional componentWillUnmount

componentWillUnmount:

Optional componentWillUpdate

componentWillUpdate:

forceUpdate

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

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

    Returns void

Optional getSnapshotBeforeUpdate

getSnapshotBeforeUpdate:

render

  • render(): React.ReactNode
  • Render the list view using the virtual DOM.

    Returns React.ReactNode

setState

  • setState<K>(state: ((prevState: Readonly<S>, props: Readonly<P>) => Pick<S, K> | S | null) | (Pick<S, K> | S | null), callback?: () => void): void
  • Type parameters

    • K: "value"

    Parameters

    • state: ((prevState: Readonly<S>, props: Readonly<P>) => Pick<S, K> | S | null) | (Pick<S, K> | S | null)
    • Optional callback: () => void
        • (): void
        • Returns void

    Returns void

Optional shouldComponentUpdate

shouldComponentUpdate:

Generated using TypeDoc