Item API

These methods are available for all Items that are returned by the list.

Properties

  • elm Element
    The actual item DOM element
  • _values Array
    Direct access to the item's values. Simplifies debugging. Note: Always use item.values() when interacting with the values.

Methods

  • values(newValues)

    • newValues optional
      If variable newValues are present the new values replaces the current item values and updates the list. If newValues are not present, the function returns the current values.

      item.values() // { name: "Jonny", age: 24, city: "Umeå" }
        item.values({
            age: 25,
            city: "Stockholm"
        });
        item.values() // { name: "Jonny", age: 25, city: "Stockholm" }
        
  • show()
    Shows the item

  • hide()
    Hides the item (removes the element from the list, and then when its shown it's appended again. The element will thereby change position in the list. A bug, but a good solution is yet to be found.)

  • matching() Boolean
    Returns boolean. True if the item matches the current filter and search. Visible items always matches, but matching items are not always visible.

  • visible() Boolean
    Returns boolean. True if the item is visible. Visible items always matches, but matching items are not always visible.