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

cancel
Showing results for 
Search instead for 
Did you mean: 
wity
Active Member II

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

Jump to solution

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. Snímek obrazovky 2021-05-13 v 14.35.24.png

 

Can anyone help me please ? Smiley Happy

1 Solution

Accepted Solutions
wity
Active Member II

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

Jump to solution
    for (let row of this.data.getRows()) {

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

View solution in original post

2 Replies
wity
Active Member II

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

Jump to solution
    for (let row of this.data.getRows()) {

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

View solution in original post

EddieMay
Community Manager
Community Manager

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

Jump to solution

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!