mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-05 22:38:48 +00:00
Hot fixed : app is crashing upon clicking on codehinter icon in isEditable field in table column (#6510)
* bug fixed app is getting crashed on clicking codehinter icon in isEditable field in table column * made the suggested changes
This commit is contained in:
parent
1a461cd680
commit
7aa8293d60
1 changed files with 23 additions and 21 deletions
|
|
@ -4,6 +4,7 @@ import { CodeHinter } from '../../../CodeBuilder/CodeHinter';
|
|||
export const ProgramaticallyHandleToggleSwitch = ({
|
||||
currentState,
|
||||
darkMode,
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
label,
|
||||
index,
|
||||
callbackFunction,
|
||||
|
|
@ -18,28 +19,29 @@ export const ProgramaticallyHandleToggleSwitch = ({
|
|||
const param = { name: property };
|
||||
const definition = { value, fxActive: props.fxActive };
|
||||
const initialValue = definition?.value ?? `{{false}}`;
|
||||
|
||||
const options = {};
|
||||
return (
|
||||
<CodeHinter
|
||||
enablePreview={true}
|
||||
currentState={currentState}
|
||||
initialValue={initialValue}
|
||||
mode={options.mode}
|
||||
theme={darkMode ? 'monokai' : options.theme}
|
||||
lineWrapping={true}
|
||||
onChange={(value) => callbackFunction(index, property, value)}
|
||||
componentName={`widget/${component.name}::${label}`}
|
||||
type={paramMeta.type}
|
||||
paramName={param.name}
|
||||
paramLabel={paramMeta.displayName}
|
||||
fieldMeta={paramMeta}
|
||||
onFxPress={(active) => {
|
||||
callbackFunction(index, 'fxActive', active);
|
||||
}}
|
||||
fxActive={props?.fxActive ?? false}
|
||||
component={component}
|
||||
className="codehinter-default-input"
|
||||
/>
|
||||
<div className={`mb-2 field ${options.className}`} onClick={(e) => e.stopPropagation()}>
|
||||
<CodeHinter
|
||||
enablePreview={true}
|
||||
currentState={currentState}
|
||||
initialValue={initialValue}
|
||||
mode={options.mode}
|
||||
theme={darkMode ? 'monokai' : options.theme}
|
||||
lineWrapping={true}
|
||||
onChange={(value) => callbackFunction(index, property, value)}
|
||||
componentName={`widget/${component?.component?.name}::${param.name}`}
|
||||
type={paramMeta.type}
|
||||
paramName={param.name}
|
||||
paramLabel={paramMeta.displayName}
|
||||
fieldMeta={paramMeta}
|
||||
onFxPress={(active) => {
|
||||
callbackFunction(index, 'fxActive', active);
|
||||
}}
|
||||
fxActive={props?.fxActive ?? false}
|
||||
component={component.component}
|
||||
className={options.className}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue