Home

# Class goog.ui.FilteredMenu

Filtered menu class.

extends goog.ui.Menu

Instance Method Summary
| `createDom()` Creates the container's DOM. Overrides {@link goog.ui.Component#createDom}.
| `decorateInternal(?Element element)` Decorates the given element with this container. Overrides {@link goog.ui.Component#decorateInternal}. Considered protected.
| `disposeInternal()` Disposes of the component. Calls {@code exitDocument}, which is expected to remove event handlers and clean up the component. Propagates the call to the component's children, if any. Removes the component's DOM from the document unless it was decorated.
| `filterItems_(?string str)` Shows/hides elements based on the supplied filter.
| `getAllowMultiple() ⇒ boolean`
| `getContentElement() ⇒ ?Element` Returns the DOM element into which child components are to be rendered, or null if the container itself hasn't been rendered yet. Overrides {@link goog.ui.Component#getContentElement} by delegating to the renderer.
| `getEnteredItems() ⇒ ?Array.<string>` Gets a list of items entered in the search box.
| `getFilter() ⇒ string` Returns the filter string.
| `getFilterFromIndex() ⇒ number` Returns the index of first item that is affected by the filter.
| `getFilterInputElement() ⇒ ?Element` Returns the filter input element.
| `getFilterLabel() ⇒ string`
| `handleFilterEvent(?goog.events.BrowserEvent e)` Handles filter input events.
| `handleKeyEvent(?goog.events.KeyEvent e) ⇒ boolean` Handles the menu's behavior for a key event. The highlighted menu item will be given the opportunity to handle the key behavior.
| `hasPersistentVisibility(?goog.ui.Component child) ⇒ boolean` Returns whether the specified child should be affected (shown/hidden) by the filter criteria.
| `initFilterInput_()` Helper method that initializes the filter input element.
| `onFilterLabelClick_(?goog.events.BrowserEvent e)` Handles clicks on the filter label. Focuses the input element.
| `setAllowMultiple(boolean b)` Sets whether multiple items can be entered comma separated.
| `setFilter(?string str)` Sets the filter string.
| `setFilterFromIndex(number index)` Sets the index of first item that should be affected by the filter. Menu items with a lower index will not be affected by the filter.
| `setFilterLabel(?string label)` Sets the filter label (the label displayed in the filter input element if no text has been entered).
| `setHighlightedIndex(number index)` Sets the highlighted index, unless the HIGHLIGHT event is intercepted and cancelled. -1 = no highlight. Also scrolls the menu item into view.
| `setPersistentVisibility(?goog.ui.Component child, boolean persistent)` Sets whether the specified child should be affected (shown/hidden) by the filter criteria.
| `setUpFilterListeners_()` Sets up listeners and prepares the filter functionality.
| `setVisible(boolean visible, boolean= opt_force) ⇒ boolean` Shows or hides the container. Does nothing if the container already has the requested visibility. Otherwise, dispatches a SHOW or HIDE event as appropriate, giving listeners a chance to prevent the visibility change.
| `tearDownFilterListeners_()` Tears down listeners and resets the filter functionality.