Skip to content

Tree Input

Form control to pick one node from a hierarchical tree (dropdown + ab-tree), with static .items or lazy data_source__thing_id.

HTML tag: c-ed70b32d96d1444c4aeb2ed59855bf105

  • pick one node from a hierarchy
  • category or folder path selection
  • lazy-loaded tree dropdown field
PropTypeDefaultDescription
valueString
value_pathStringvalue
display_pathStringlabel
itemsArray
data_source__thing_idString
value_delimiterString.
value_resolution_modeStringfull_value
labelString
helper_textString
placeholderStringSelect an item…
disabledBooleanfalse
readonlyBooleanfalse
requiredBooleanfalse
statusStringdefault
openBooleanfalse
trigger_iconStringmi:expand_more
close_on_outside_clickBooleantrue
selected_itemObject
label_displayStringpath
children_pathStringchildren
has_children_pathStringhas_children
child_count_pathString
is_leaf_pathStringis_leaf
has_children_conditionString
probe_children_on_expandStringwhen_unknown
default_expand_levelNumber
selection_modeStringsingle
expanded_keysString
indent_sizeNumber12
text_alignStringleft
row_guidesBoolean
data_source_input_paramsObject[object Object]
parent_param_pathStringparent_thing_id
min_search_charsNumber2
search_param_pathStringsearch_term
server_debounce_msNumber250
tree_max_heightNumber320
keep_open_on_selectBoolean
  • Bind .value as path string (see value_delimiter, value_resolution_mode).
  • value-changed emits rich detail on commit; selected-item-changed fires with current value.
  • Configure children_path, value_path, display_path; server search via min_search_chars and search_param_path.
  • selection_mode typically single.
EventDetail
value-changedvalue: String, item: Object, path_value: String, path_keys: Array, path_labels: Array, leaf_key: String, path_items: Array
selected-item-changeditem: Object, value: String
SignatureDescription
toggleDropdown()
closeDropdown()
focus(options: Object)
blur()
setValue(value: any, options: Object)

Do not use ab-select for deep hierarchies. Do not use ab-list when you only need to pick one existing node.

<c-ed70b32d96d1444c4aeb2ed59855bf105 .label=${'Category'} .items=${tree} .value=${categoryPath} .value_path=${'id'} .display_path=${'label'} @value-changed=${onPath}></c-ed70b32d96d1444c4aeb2ed59855bf105>