Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SearchManager

Class that enables to search a list of elements with the same data

Hierarchy

  • SearchManager

Index

Constructors

constructor

Accessors

searchBarIsFocused

  • get searchBarIsFocused(): boolean

Static searchQueryExpression

  • get searchQueryExpression(): RegExp
  • Regular expression for the search query

    • Group 01 ([1]): The group contains either undefined or metadata key
      • key:keyword = key
      • key:"key word" = key
      • keyword = undefined
      • "key word" = undefined
    • Group 02 ([2]): The group contains either undefined or the keyword contained in two quotation marks ("...") and separated by two whitespaces (or the begin/end of the string)
      • key:keyword = undefined
      • key:"key word" = key word
      • keyword = undefined
      • "key word" = key word
    • Group 03 ([3]): The group contains either undefined or a keyword separated by two whitespaces (or the begin/end of the string)
      • key:keyword = keyword
      • key:"key word" = undefined
      • keyword = keyword
      • "key word" = undefined

    Returns RegExp

Methods

focusSearchBar

  • focusSearchBar(): void

search

  • search(query: string): void
  • Do a search which automatically hides list elements that aren't matches

    example

    search('')

    example

    search('searchEverywhere')

    example

    search(' searchEverywhere searchEverywhere ')

    example

    search('"search everywhere" searchEverywhere')

    example

    search('"search everywhere" description:searchDescription')

    example

    search('title:"search only metadata title text content"')

    Parameters

    • query: string

    Returns void

showAllElements

  • showAllElements(): void

Static getSearchQueryExpressionResults

Generated using TypeDoc