Skip to content

Consolidate item selection logic between list, treeview, table, and selects #21731

Open
0 of 1 issue completed
@KaelWD

Description

@KaelWD

We currently have four slightly different implementations of transformItem:

  • VList
  • VDataIterator
  • VDataTable
  • list-items

and three implementations of "selecting items"

  • VDataTable (also used by VDataIterator)
  • nested
  • list-items (used by VSelect etc but not VList)

list-items is the only one that matches object values fast and correctly (#20937)

  • VDataTable still has a O(n2) find() inside map() in transformIn
  • VDataTable handles multiple items with the same primitive value but only matches the first item with return-object
  • nested uses a Set to store values so only matches objects by reference
  • nested logs a warning if multiple nodes have the same value, and if one is removed from the list then they're all removed from the nodeIds Set
  • VDataTable and nested both ignore item-value when return-object is set and use the entire object as a value instead

Sub-issues

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions