APIs

Show:

Component for sitemap render from the object with links.

Methods

_elementHasChildren

(
  • element
)
private

Checks if element has children.

Parameters:

_elementMatchesRegex

(
  • regex
  • element
)
private

Checks element caption string for regex.

Parameters:

_searchTree

(
  • regexQuery
  • currentTree
)
private

Recursively returns filtered sitemap.

Parameters:

_startSearch

() private

Runs search.

actions.menuToggle

()

Show or hide menu.

clickSearchIcon

() private

Click on the search icon handler.

startSearch

() private

Initiate sitemap search.

toggleResultsList

() private

Toggle isShowingResults prop.

Properties

_results

Array private

Result array consisting of filtered objects.

classNames

Array

Default class for component wrapper.

isShowingResults

Boolean

Toggler for showing .sitemap-search-results-list.

lastKeyPress

String

User input from .sitemap-search-input.

lastKeyPress

Number

Event timestamp in milliseconds.

nodeIsOpen

Boolean

Stores node state.

Default: false

noHits

Boolean

Flag for showing error message if user query doesn't get any hits.

placeholder

String

Component's input placeholder.

Default: t('components.flexberry-sitemap-searchbar.placeholder')

sitemap

Array

Array of search objects.

sitemap

Object

Object with links description.

Example:

{
                      nodes: [
                        {
                          link: 'index',
                          caption: 'Home',
                          title: 'Go to homepage!',
                        },
                        {
                          caption: 'Superheroes',
                          children: [
                            {
                              link: 'superman',
                              caption: 'Superman',
                            },
                            {
                              link: 'ironman',
                              caption: 'Ironman',
                            },
                          ],
                        },
                      ],
                    }