0

I have this Tree in ExtJs that allows for multiple selection:

<Tree
    ref={this.treeRef}
    flex={1}
    store={this.treeStore}
    selectable={{
        mode: 'multi',
        rows: true,
        drag: true,
}}/>

My problem is the fact that I cannot get the selected records. If I run getSelection it will return the last element selected/a single element.

How does one get all the selected elements in a tree? I found nothing in their docs and, of course, their forums are long dead.

Dawesi
  • 568
  • 3
  • 9
Romeo Mihalcea
  • 9,714
  • 12
  • 50
  • 102

1 Answers1

0

Turns out the Tree has an undocumented method getSelected() which contains the selected items.

Romeo Mihalcea
  • 9,714
  • 12
  • 50
  • 102
  • seems like a bug: should come from documented here: https://docs.sencha.com/extreact/7.0.0/modern/Ext.grid.Tree.html#method-getSelection as you suggested – Dawesi Dec 04 '19 at 07:37