From 0cd034e7748398ec8d9cf4187185dca4d298a611 Mon Sep 17 00:00:00 2001 From: achung Date: Thu, 27 Feb 2025 13:08:42 -0800 Subject: [PATCH] Avoid aggressively trimming text boxes in configure-beta --- configure/src/core/Maker.js | 36 +++++++++++++++++++ .../src/metaconfigs/layer-data-config.json | 2 +- .../src/metaconfigs/layer-header-config.json | 2 +- .../src/metaconfigs/layer-model-config.json | 2 +- .../src/metaconfigs/layer-query-config.json | 2 +- .../src/metaconfigs/layer-tile-config.json | 4 +-- .../src/metaconfigs/layer-vector-config.json | 2 +- .../metaconfigs/layer-vectortile-config.json | 2 +- .../metaconfigs/layer-velocity-config.json | 2 +- 9 files changed, 45 insertions(+), 9 deletions(-) diff --git a/configure/src/core/Maker.js b/configure/src/core/Maker.js index 27ac9e46c..ccbd8f51a 100644 --- a/configure/src/core/Maker.js +++ b/configure/src/core/Maker.js @@ -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(); @@ -280,6 +283,39 @@ const getComponent = ( )} ); + case "textnotrim": + inner = ( + { + updateConfiguration(forceField || com.field, e.target.value, layer); + }} + /> + ); + return ( +
+ {inlineHelp ? ( + <> + {inner} +
+ + ) : ( + + {inner} + + )} +
+ ); case "button": inner = (