mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-06 06:48:21 +00:00
* followup to: 2789
* Revert "followup to: 2789"
This reverts commit 8a2b8b90a4.
* followup to: 2789
This commit is contained in:
parent
e8ca5cbc73
commit
7c7b011537
3 changed files with 9 additions and 6 deletions
|
|
@ -327,10 +327,10 @@ export const JSONNode = ({ data, ...restProps }) => {
|
|||
<div
|
||||
style={{ width: 'inherit' }}
|
||||
className={`${shouldDisplayIntendedBlock && 'group-border'} ${applySelectedNodeStyles && 'selected-node'}`}
|
||||
onMouseEnter={() => updateHoveredNode(currentNode, currentNodePath)}
|
||||
onMouseLeave={() => updateHoveredNode(null)}
|
||||
>
|
||||
<div
|
||||
onMouseEnter={() => updateHoveredNode(currentNode, currentNodePath)}
|
||||
onMouseLeave={() => updateHoveredNode(null)}
|
||||
className={cx('d-flex', {
|
||||
'group-object-container': shouldDisplayIntendedBlock,
|
||||
'mx-2': typeofCurrentNode !== 'Object' && typeofCurrentNode !== 'Array',
|
||||
|
|
|
|||
|
|
@ -15,7 +15,11 @@ const JSONTreeValueNode = ({ data, type }) => {
|
|||
);
|
||||
}
|
||||
|
||||
const value = type === 'String' ? `"${data}"` : String(data);
|
||||
let value = type === 'String' ? `"${data}"` : String(data);
|
||||
if (value.length > 65) {
|
||||
value = `${value.substring(0, 65)} ... "`;
|
||||
}
|
||||
|
||||
const clsForUndefinedOrNull = (type === 'Undefined' || type === 'Null') && 'badge badge-secondary';
|
||||
return (
|
||||
<span
|
||||
|
|
|
|||
|
|
@ -157,10 +157,9 @@ export class JSONTreeViewer extends React.Component {
|
|||
newPath = `${path}.${key}`;
|
||||
}
|
||||
|
||||
if (_.isObject(value) || _.isArray(value)) {
|
||||
buildMap(value, newPath);
|
||||
} else if (_.isFunction(value)) {
|
||||
if (_.isObject(value)) {
|
||||
map.set(newPath, { type: _type });
|
||||
buildMap(value, newPath);
|
||||
} else {
|
||||
map.set(newPath, { type: _type });
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue