Posted 18 March 2024, 8:16 pm EST - Updated 18 March 2024, 8:26 pm EST
Does anyone know how to change the ribbon height or how to render the ribbon using ToolbarModeConfig? I’m using react.js framework and below is my code passed to the Designer component config prop to render a custom ribbon.
I’ve tried calling the ribbon height method as per the documentation like so config.ribbon.ribbonHeight = 80 but I get the following error:
Property ‘ribbonHeight’ does not exist on type ‘IRibbonPanel[] | IRibbonPanelConfig’.
Property ‘ribbonHeight’ does not exist on type ‘IRibbonPanel[]’.ts(2339)
Any help would be much appreciated.
const designerConfig = () => {
const designer = GC.Spread.Sheets.Designer;
const config = designer.ToolBarModeConfig;
config.ribbon = [];
config.ribbon.unshift(ribbonOptions());
return config;
};
This is how I’m calling the function above
<Designer
styleInfo={styleInfo}
config={designerConfig()}
designerInitialized={(designer: any) => initDesigner(designer)}
></Designer>