Skip to content

Commit 719ac09

Browse files
authored
fix: Non-printable character box missing when editing Cloud Config parameter (parse-community#3218)
1 parent a54cc46 commit 719ac09

2 files changed

Lines changed: 19 additions & 15 deletions

File tree

src/components/NonPrintableHighlighter/NonPrintableHighlighter.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105

106106
// Info badge styles for non-alphanumeric character detection
107107
.infoContainer {
108-
margin-top: 8px;
108+
margin-top: -4px;
109109
}
110110

111111
.infoBadge {

src/dashboard/Data/Config/ConfigDialog.react.js

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -59,22 +59,26 @@ const EDITORS = {
5959
),
6060
Date: (value, onChange) => <DateTimeInput fixed={true} value={value} onChange={onChange} />,
6161
Object: (value, onChange, wordWrap, syntaxColors) => (
62-
<JsonEditor
63-
value={value || ''}
64-
onChange={onChange}
65-
placeholder={'{\n ...\n}'}
66-
wordWrap={wordWrap}
67-
syntaxColors={syntaxColors}
68-
/>
62+
<NonPrintableHighlighter value={value} isJson={true} detectNonAlphanumeric={true}>
63+
<JsonEditor
64+
value={value || ''}
65+
onChange={onChange}
66+
placeholder={'{\n ...\n}'}
67+
wordWrap={wordWrap}
68+
syntaxColors={syntaxColors}
69+
/>
70+
</NonPrintableHighlighter>
6971
),
7072
Array: (value, onChange, wordWrap, syntaxColors) => (
71-
<JsonEditor
72-
value={value || ''}
73-
onChange={onChange}
74-
placeholder={'[\n ...\n]'}
75-
wordWrap={wordWrap}
76-
syntaxColors={syntaxColors}
77-
/>
73+
<NonPrintableHighlighter value={value} isJson={true} detectNonAlphanumeric={true}>
74+
<JsonEditor
75+
value={value || ''}
76+
onChange={onChange}
77+
placeholder={'[\n ...\n]'}
78+
wordWrap={wordWrap}
79+
syntaxColors={syntaxColors}
80+
/>
81+
</NonPrintableHighlighter>
7882
),
7983
GeoPoint: (value, onChange) => <GeoPointInput value={value} onChange={onChange} />,
8084
File: (value, onChange) => (

0 commit comments

Comments
 (0)