I am trying to access the List view command bar in commnd-set spfx project but no success. I am trying below code:

const compareOneCommand: Command = this.tryGetCommand('COMMAND_1');
    if (compareOneCommand) {
      // This command should be hidden unless exactly one row is selected.
      compareOneCommand.visible = event.selectedRows.length === 1;
    const upld :Command = this.tryGetCommand('Upload');
      alert('upload found');
      upld.visible = false;

I am able to get custom command 'Command_1' but no Luck with 'Upload' Button. The intention is to hide the Upload Button in modern Library experience.

Please help me out.. Urgently needed! Thanks in advance

  • Is this possible? – Damitha Feb 22 '18 at 9:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.