How to remove the 'Options' to collapse/expand the widget?

Bird1
Mega Sage

I have cloned the 'Variable Summarizer' widget but I found that the Options to collapse/expand comes (even all the source codes are from the original one). Do anyone know how to remove it?

 

 

Bird1_1-1671607500978.png

 

Bird1_0-1671607461155.png

 

 

The original widget 'Variable Summarizer' is working fine. There's no 'Options' to collapse/expand.

 

Bird1_2-1671607599536.png

 

1 ACCEPTED SOLUTION

Try

c.toggle = true;
c.hide_control = true;

View solution in original post

6 REPLIES 6

Shruti
Mega Sage
Mega Sage

Hey,

 

Go the client script of cloned variable summarizer widget

Make c.hide_control = true;

 

 

Hi Shruti,

 

I updated the client script but the options to collapse/expand still there.

 

function($scope, snAttachmentHandler, i18n, spModal) {
/* widget controller */
var c = this;
c.toggle = c.options.toggle || false;
// c.hide_control = c.options.hide_control || false;
c.hide_control = false;
c.task = c.options ? c.options.task : "";

/* Open mrvs data in a model for mobile screen */
c.openMrvsModal = function(data) {
spModal.open({
title: data.label,
widget: "template_renderer",
widgetInput: {data: data, template: "sp_multirow_vs_summarizer.html"},
buttons: [{label:c.data.labelClose, primary: true}]
});
}

$scope.scanAttachment = function(variable) {
if (variable.state == 'not_available')
snAttachmentHandler.showMessage('error',i18n.getMessage('Upload file scan failed').withValues([variable.display_value]));
else
snAttachmentHandler.scanAttachment({'sys_id' : variable.value});
}
}

Bird1_1-1671614354663.png

 

Bird1_0-1671614328989.png

 

Sorry my bad please make it true c.hide_control = true;

Thanks. After update to c.hide_control = true; 

 

the options is gone as expected. Unfortunately that it's collapse by default, could you please advise how to make it 'expand' by default?

 

Bird1_0-1671614968927.png