powerbipowerbi-embedded

How to disable copy in PowerBi embedded report


enter image description here

How do you disable copy value and copy selection in an embedded report?

I followed this documentation.

This is my extension

extensions: {
                        commands: [
                            {
                                name: 'copy',
                                displayOption: models.CommandDisplayOption.Disabled
                            },
                            {
                                name: 'clearSelection',
                                displayOption: models.CommandDisplayOption.Disabled
                            }
                        ]
                    }

Can someone please help?

EDIT: I'm using 'powerbi-client-react' in my code to embed my report.

import { PowerBIEmbed } from 'powerbi-client-react';

Solution

  • Shouldn't it be:

    {
     commands: [
     {
       copy: {
         displayOption: models.CommandDisplayOption.Disabled
       }
     }
     ]
    }