Sorting in Tree Select component

Hi,

I am using Tree Select component from marketplace.
On Page Enter I load my categories and try to set them in tree option. As well as sort them by name alphabetically.


image

This is what data is retrieved:

And this is how it looks on UI:
image

I guess, I am lacking some understanding on list sorting (see 1st screenshot) but I can not get 2nd and 3rd level categories to be sorted by their name.

Will appreciate any advice.

Hi @Uldis_Borkus ,

You need to pass “Get property” block instead of property name to “sort by” param.
Here is example of your modified logic:

Sorry for the lack of documentation for this block. This is not obvious moment. I have created an internal ticket to add information about this block to our documentation.

Regards, Andriy

@Andriy_Konoz Once you mention it, it seems obvious :slight_smile: Thanks for pointing out!

1 Like