Getting Every Ribbon Button Twice

Posted by: shivambhardwajfdb on 3 May 2022, 8:43 pm EST

  • Posted 3 May 2022, 8:43 pm EST

    This is my code .
      config.ribbon[0].buttonGroups.unshift({
    label: "Refresh Data",
    thumbnailClass: "",
    commandGroup: {
    children: [
    {
    direction: "vertical",
    commands: ["cmdRfrh"],
    },
    ],
    },
    });
    config.ribbon[0].buttonGroups.unshift({
    label: "Save Data",
    thumbnailClass: "",
    commandGroup: {
    children: [
    {
    direction: "vertical",
    commands: ["cmdSaveData"],
    },
    ],
    },
    });
    config.ribbon[0].buttonGroups.unshift({
    label: "Share",
    thumbnailClass: "",
    commandGroup: {
    children: [
    {
    direction: "vertical",
    commands: ["cmdShareData"],
    },
    ],
    },
    });
    config.ribbon[0].buttonGroups.unshift({
    label: "UserEmail",
    thumbnailClass: "",
    commandGroup: {
    children: [
    {
    direction: "horizontal",
    commands: ["cmdUserList"],
    },
    ],
    },
    });
    config.ribbon[0].buttonGroups.unshift({
    label: "Welcome",
    thumbnailClass: "welcome",
    commandGroup: {
    children: [
    {
    direction: "vertical",
    commands: ["Welcome"],
    },
    {
    direction: "vertical",
    commands: ["wel2"],
    },
    ],
    },
    });


    config.commandMap = {
    Welcome: {
    title: "Welcome",
    text: "Welcome",
    iconClass: "ribbon-button-welcome",
    bigButton: "true",
    commandName: "Welcome",
    execute: async (context, propertyName, fontItalicChecked) => {
    alert("Welcome to new designer " + userName);
    },
    },
    cmdRfrh: {
    title: "refresh data from server",
    text: "Refresh",
    iconClass: "cmdRfrh",
    bigButton: "true",
    commandName: "cmdRfrh",
    execute: async (context, propertyName, fontItalicChecked) => {
    refershData(ref, fileData);
    },
    },
    cmdSaveData: {
    title: "Save data to server",
    text: "Save",
    iconClass: "cmdSaveData",
    bigButton: "true",
    commandName: "cmdSaveData",
    execute: async (context, propertyName, fontItalicChecked) => {
    saveToDB(ref);
    },
    enableContext: permission,
    },
    cmdUserList: {
    title: "list of users",
    text: UserEmail + "\n" + UserEmail,
    style: "",
    bigButton: "true",
    commandName: "cmdUserList",
    execute: async (context, propertyName, fontItalicChecked) => {
    console.log(UserEmail);
    },
    },
    cmdShareData: {
    title: "Share",
    text: "Share",
    bigButton: "true",
    commandName: "cmdShareData",
    execute: async (context, propertyName, fontItalicChecked) => {
    setModalShow(true);
    },
    },
    };
  • Replied 4 May 2022, 4:06 am EST

    Hi Shivam,

    We tested with the latest version of SpreadJS(V15.0.7) and it seems to be working fine at our end.

    For example, you can refer to the following sample that we have used for testing: https://jscodemine.grapecity.com/share/7s2h3Wn4FEuTNGeHeVLpmQ/

    If the issue still persists for you, please share a working sample so that we can investigate it at our end and assist you accordingly.

    Add Button in a Tab: https://www.grapecity.com/spreadjs/docs/latest/online/add_button_in_tab.html

    Regards

    Ankit
Need extra support?

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

Learn More

Forum Channels