Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions configure/src/core/Maker.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,9 @@ const getComponent = (
}}
value={value != null ? value : getIn(directConf, com.field, "")}
onChange={(e) => {
updateConfiguration(forceField || com.field, e.target.value, layer);
}}
onBlur={(e) => {
let v = e.target.value;
// remove surrounding whitespace, " hi " -> "hi"
if (typeof v === "string") v = v.trim();
Expand All @@ -280,6 +283,39 @@ const getComponent = (
)}
</div>
);
case "textnotrim":
inner = (
<TextField
className={c.text}
label={com.name}
variant="filled"
size="small"
inputProps={{
autoComplete: "off",
}}
value={value != null ? value : getIn(directConf, com.field, "")}
onChange={(e) => {
updateConfiguration(forceField || com.field, e.target.value, layer);
}}
/>
);
return (
<div>
{inlineHelp ? (
<>
{inner}
<div
className={c.subtitle2}
dangerouslySetInnerHTML={{ __html: com.description || "" }}
></div>
</>
) : (
<Tooltip title={com.description || ""} placement="top" arrow>
{inner}
</Tooltip>
)}
</div>
);
case "button":
inner = (
<Button
Expand Down
2 changes: 1 addition & 1 deletion configure/src/metaconfigs/layer-data-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"field": "name",
"name": "Layer Name",
"description": "",
"type": "text",
"type": "textnotrim",
"width": 8
},
{
Expand Down
2 changes: 1 addition & 1 deletion configure/src/metaconfigs/layer-header-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"field": "name",
"name": "Layer Name",
"description": "",
"type": "text",
"type": "textnotrim",
"width": 8
}
]
Expand Down
2 changes: 1 addition & 1 deletion configure/src/metaconfigs/layer-model-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"field": "name",
"name": "Layer Name",
"description": "A display name for the layer.",
"type": "text",
"type": "textnotrim",
"width": 6
},
{
Expand Down
2 changes: 1 addition & 1 deletion configure/src/metaconfigs/layer-query-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"field": "name",
"name": "Layer Name",
"description": "A display name for the layer.",
"type": "text",
"type": "textnotrim",
"width": 6
},
{
Expand Down
4 changes: 2 additions & 2 deletions configure/src/metaconfigs/layer-tile-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"field": "name",
"name": "Layer Name",
"description": "",
"type": "text",
"type": "textnotrim",
"width": 4
},
{
Expand Down Expand Up @@ -201,7 +201,7 @@
"field": "cogUnits",
"name": "Units",
"description": "Units string by which to suffix values. For instance if the units are meters, use 'm' so that values are displayed as '100m'.",
"type": "text",
"type": "textnotrim",
"width": 2
},
{
Expand Down
2 changes: 1 addition & 1 deletion configure/src/metaconfigs/layer-vector-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"field": "name",
"name": "Layer Name",
"description": "A display name for the layer.",
"type": "text",
"type": "textnotrim",
"width": 6
},
{
Expand Down
2 changes: 1 addition & 1 deletion configure/src/metaconfigs/layer-vectortile-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"field": "name",
"name": "Layer Name",
"description": "A display name for the layer.",
"type": "text",
"type": "textnotrim",
"width": 6
},
{
Expand Down
2 changes: 1 addition & 1 deletion configure/src/metaconfigs/layer-velocity-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"field": "name",
"name": "Layer Name",
"description": "A display name for the layer.",
"type": "text",
"type": "textnotrim",
"width": 6
},
{
Expand Down