SelectEntriesExtension extension

on

Properties

firstSelectedId String?

Available on SelectEntries, provided by the SelectEntriesExtension extension

Returns the id of the first selected entry, or null when nothing is selected. Convenience accessor for single-selection tabs such as sort order.
no setter

Methods

cascadingPairsOf(String categoryId) List<({List<String> childIds, String id})>

Available on SelectEntries, provided by the SelectEntriesExtension extension

Returns parent → child-id pairs for a cascading category (e.g. region/metro with districts and sub-districts).
childIdsOf(String categoryId) List<String>

Available on SelectEntries, provided by the SelectEntriesExtension extension

Returns the ids of all direct children of the category with categoryId.
childRangesOf(String categoryId) List<SelectRangeEntry>

Available on SelectEntries, provided by the SelectEntriesExtension extension

Returns all direct children of the category with categoryId that are SelectRangeEntry values (e.g. price/area ranges carrying min/max).
findCategory(String categoryId) SelectEntry?

Available on SelectEntries, provided by the SelectEntriesExtension extension

Finds the first selected top-level entry (category) whose id matches categoryId, or null if no such category is selected.
findChildrenAtLevel(SelectEntry entry, int level) Set<SelectEntry>

Available on SelectEntries, provided by the SelectEntriesExtension extension

Returns the child entries of entry located at the given tree level.
findExtrasAtLevel(SelectEntry entry, int level) List<String>

Available on SelectEntries, provided by the SelectEntriesExtension extension

Returns the extra ids of the children of entry located at the given tree level.
findIdsAtLevel(SelectEntry entry, int level) Set<String>

Available on SelectEntries, provided by the SelectEntriesExtension extension

Returns the ids of the children of entry located at the given tree level.
flatten() List<SelectEntries>?

Available on SelectEntries, provided by the SelectEntriesExtension extension

Flattens a selection tree into a list of selections per depth level.
insert(int index, SelectEntry entry) → void

Available on SelectEntries, provided by the SelectEntriesExtension extension

Inserts entry at the given index while preserving set iteration order.
toQueryMap() Map<String, List<String>>

Available on SelectEntries, provided by the SelectEntriesExtension extension

Converts this selection tree into a map of query keys to value lists, e.g. {cate1: [a, b], cate2: [c]}.
toQueryParameters({SelectArrayFormat arrayFormat = SelectArrayFormat.repeat, String delimiter = ',', bool encode = true}) String

Available on SelectEntries, provided by the SelectEntriesExtension extension

Converts this selection tree into a URL query string such as cate1=a&cate2=b, with the multi-value layout controlled by arrayFormat.