cancel
Showing results for 
Search instead for 
Did you mean: 

ADF toolbar button - get nodeRefs from selected nodes (array)

wity
Confirmed Champ
Confirmed Champ

Hi everyone, 

I need make custom action toolbar button, which give me nodeIDs of selected files. 

The case is about calling api with nodeIDs array infomartion. 

in my custom view adf component I have:

<adf-toolbar title="Search folders by query">
  <button mat-icon-button title="Run action" (click)="myCustomAction2($event)">
    <mat-icon>replay</mat-icon>
  </button>

and in .ts file

myCustomAction2(event){
  console.log(event);
}

"event" contains many infomartion but i did not see my selected nodeRefs. image

Can anyone help me please ? Smiley Happy

1 ACCEPTED ANSWER

wity
Confirmed Champ
Confirmed Champ
    for (let row of this.data.getRows()) {

      if (row.isSelected == true) {
        console.log(row.getValue("nodeRef"));
      }

View answer in original post

2 REPLIES 2

wity
Confirmed Champ
Confirmed Champ
    for (let row of this.data.getRows()) {

      if (row.isSelected == true) {
        console.log(row.getValue("nodeRef"));
      }

EddieMay
World-Class Innovator
World-Class Innovator

Hi @wity 

Great that you found out how to do it - and thanks for showing us how! Really helpful to other users.

Cheers,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!