0

I would like to implement sorting for the <lightning-tree-grid> by clicking on columns.

For <lightning-datatable> I can simply add the following properties to the HTML element:

onsort={handleSort}
sorted-by={sortedBy}
sorted-direction={sortedDirection}

enter image description here

(notice the arrow down for ascending order)

How can I achieve the same for the <lightning-tree-grid> component please?

1 Answer 1

0

As per the documentation,

Inline editing and sorting of columns are not supported. Supported features include:

  • Displaying and formatting of columns with appropriate data types
  • Header-level actions
  • Row-level actions
  • Resizing of columns
  • Selecting of rows
  • Text wrapping and clipping
1
  • Why would this not be supported please? I would like to group by + sort on columns. It would be intuitive to have the columns clickable to sort Commented Feb 26 at 13:05

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.