Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ReactWidget
    • PreferencesSearchbarWidget

Implements

  • StatefulWidget

Index

Constructors

Properties

onFilterChanged: Event<string> = ...
onFilterStringChangedEmitter: Emitter<string> = ...
resultsCount: number = 0
search: ((...arguments: [value: string]) => Promise<void>) = ...

Type declaration

    • (...arguments: [value: string]): Promise<void>
    • Debounce promise-returning & async functions.

      example
      import pDebounce = require('p-debounce');

      const expensiveCall = async input => input;

      const debouncedFn = pDebounce(expensiveCall, 200);

      for (const i of [1, 2, 3]) {
      debouncedFn(i).then(console.log);
      }
      //=> 3
      //=> 3
      //=> 3

      Parameters

      • Rest ...arguments: [value: string]

      Returns Promise<void>

      A function that delays calling fn until after wait milliseconds have elapsed since the last time it was called.

searchbarRef: RefObject<HTMLInputElement> = ...
ID: "settings.header" = 'settings.header'
LABEL: "Settings Header" = 'Settings Header'
SEARCHBAR_ID: "preference-searchbar" = 'preference-searchbar'

Methods

  • clearSearchResults(e: MouseEvent<Element, MouseEvent>): Promise<void>
  • focus(): void
  • getSearchTerm(): string
  • handleSearch(e: ChangeEvent<HTMLInputElement>): Promise<void>
  • init(): void
  • render(): ReactNode
  • renderClearAllOption(): ReactNode
  • renderOptionContainer(): ReactNode
  • renderResultsCountOption(): ReactNode
  • searchTermExists(): boolean
  • updateResultsCount(count: number): void
  • updateSearchTerm(searchTerm: string): Promise<void>