ve.SearchSelect

ve.Component. ve.SearchSelect

Refer to ve.Component for methods or fields inherited from this Component's parent such as .options.attributes or .element.

Search select/filter component used as a raw interface pool with a searchbar in which users can look up matching items with selected 'data-' attributes. Elements with the attribute ve-display=true will always be shown.

  • Functional binding: veSearchSelect().
Constructor:
  • arg0_components_obj: Object<ve.Component> - The individual items to append to the current search select field.
  • arg1_options: Object
    • .display="inline": string
    • .header_components_obj: Object<ve.Component>
    • .hide_filter=false: boolean - Whether to hide the filter tool.
    • .filter_names: function(arg0_attribute_key:string)|Object
      • <attribute_key>: string
    • .search_select_els: function | Array<HTMLElement> - The function that returns the search select elements in question, usually document.querySelectorAll.
    • .search_keys=["name"]: Array<string>
Instance:
  • .components_obj: Object<ve.Component>
  • .filters: Object - Any filters currently applied to the component.
    • <filter_key>: true
  • .search_value: string - The current user search query.
  • .v: this.components_obj - Accessor. The current components_obj mounted to ve.SearchSelect.
Methods:

Constructor

new ve.SearchSelect()

Source:

Extends

Members

v :Array.<ve.Component>

Returns the current this.components_obj.

  • Accessor of: ve.SearchSelect
Source:
Type:

v

Sets the current this.components_obj displayed in the search select box.

  • Accessor of: ve.Hierarchy
Source:

from_binding

Internal .from_binding setter for handling .options.from_binding. Accepts a string literal that is then parsed to a variable reference.

.to_binding counterparts are manually handled child-side.

Overrides:
Source:

limit

Tests the current this.limit by calling this.limit_function(this.v, this). Otherwise resolves to true if no .options.limit is set.

Overrides:
Source:

name

Returns the visual name of the present ve.Component,

Overrides:
Source:

Methods

getComponentElements() → {Array.<HTMLElement>}

Returns all actual component elements.

  • Method of: ve.SearchSelect
Source:
Returns:
Type:
Array.<HTMLElement>

updateSearchFilter()

Updates the present search filter to be inline with this.filters and this.search_value.

  • Method of: ve.SearchSelect
Source:

addComponent()

Adds the current component to this.parent_el should it exist.

Overrides:
Source:

bind(arg0_container_el)

Manually binds/mounts the present ve.Component into the visual DOM.

Overrides:
Source:
Parameters:
Name Type Description
arg0_container_el HTMLElement

fireFromBinding()

Pseudo-setter from binding. Fires only upon program-driven changes to .v directly, which means that this has to be monitored manually component-side in set v(). This should always come last in set v().

Overrides:
Source:

fireToBinding()

Pseudo-setter to binding. Fires only upon user-driven changes, which means that this has to be monitored manually component-side.

Overrides:
Source:

remove()

Removes the component/element from the DOM.

Overrides:
Source:

removeComponent()

Removes the current component from this.parent_el should it exist.

Overrides:
Source:

setOwner(arg0_value, arg1_owner_array)

Sets the root parent and ownership tree. Influences this.parent_el, this.owner, this.owners.

Overrides:
Source:
Parameters:
Name Type Description
arg0_value
arg1_owner_array

setValueFromObject(arg0_object, arg1_object)

Destructures Object values and transfers them into the .v instance fields of each Vercengen component.

Overrides:
Source:
Parameters:
Name Type Description
arg0_object Object

The Vercengen object to transfer to.

arg1_object Object

The other object to transfer from.