Disable/enable tab or children item in Format cells popup menu

Posted by: nhan.thanh.nguyen on 3 April 2023, 2:13 am EST

  • Posted 3 April 2023, 2:13 am EST - Updated 3 April 2023, 2:23 am EST

    Hi team,

    As title, I want to disable/enable some children’s items or tabs from “Format cells” menu.

    Is there any way to handle this?

    In the picture I send, I just splice menu items from tab items. I want to disable instead of splicing.



    I’m using SpreadJs version 14.0.4 with ReactJs

    Thanks and Best Regards,

    Nhan Nguyen

  • Posted 5 April 2023, 12:08 am EST

    Hello Nhan,

    As per my understanding, you want to disable tabs or options in the format dialog box. For this use case, you can utilize css rules to disable tabs or options inside a tab. You can add css classes to the elements which you want to disable.

    Please refer to the code snippet and attached sample.

    [tab_id=Fill] {
      pointer-events: none;
      opacity: 0.5;
    }
    
    [data-value=currency] {
      pointer-events: none;
      opacity: 0.5;
    }

    Please let us know if you face any difficulties.

    Regards,

    Ankit

    designer-sample.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels