mirror of
https://github.com/grafana/grafana.git
synced 2024-12-29 10:21:41 -06:00
Table: Fix JSON formatting (#92715)
This commit is contained in:
parent
962fcf1fa8
commit
91cbaa4afe
@ -28,10 +28,11 @@ export function TableCellInspector({ value, onDismiss, mode }: TableCellInspecto
|
|||||||
if (trimmedValue[0] === '{' || trimmedValue[0] === '[' || mode === 'code') {
|
if (trimmedValue[0] === '{' || trimmedValue[0] === '[' || mode === 'code') {
|
||||||
try {
|
try {
|
||||||
value = JSON.parse(value);
|
value = JSON.parse(value);
|
||||||
|
displayValue = JSON.stringify(value, null, '');
|
||||||
} catch {}
|
} catch {}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
displayValue = JSON.stringify(value, null, ' ');
|
displayValue = JSON.stringify(value, null, '');
|
||||||
}
|
}
|
||||||
let text = displayValue;
|
let text = displayValue;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user