From 436f83b1fa8086bdc504f7f57cb4bea9a1de2a9d Mon Sep 17 00:00:00 2001 From: Jon Uhlmann Date: Sun, 22 Oct 2023 12:36:25 +0200 Subject: [PATCH 1/2] BUGFIX: Respect also min value in width of input field on RangeEditor Closes #3648 --- packages/neos-ui-editors/src/Editors/Range/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/neos-ui-editors/src/Editors/Range/index.js b/packages/neos-ui-editors/src/Editors/Range/index.js index d509a442f9..b8902ba8aa 100755 --- a/packages/neos-ui-editors/src/Editors/Range/index.js +++ b/packages/neos-ui-editors/src/Editors/Range/index.js @@ -64,6 +64,7 @@ class RangeEditor extends PureComponent { const options = {...this.constructor.defaultProps.options, ...this.props.options}; const {value, highlight} = this.props; const valueAsString = value === 0 ? '0' : (value || ''); + const styleWidth = Math.max(options.min.toString().length, options.max.toString().length) + 'ch' return (
{options.unit} From dc0bfad7af641da966413dbabb668c798b437129 Mon Sep 17 00:00:00 2001 From: Jon Uhlmann Date: Sun, 22 Oct 2023 12:44:51 +0200 Subject: [PATCH 2/2] BUGFIX: Add missin semicolon --- packages/neos-ui-editors/src/Editors/Range/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/neos-ui-editors/src/Editors/Range/index.js b/packages/neos-ui-editors/src/Editors/Range/index.js index b8902ba8aa..ed9112a591 100755 --- a/packages/neos-ui-editors/src/Editors/Range/index.js +++ b/packages/neos-ui-editors/src/Editors/Range/index.js @@ -64,7 +64,7 @@ class RangeEditor extends PureComponent { const options = {...this.constructor.defaultProps.options, ...this.props.options}; const {value, highlight} = this.props; const valueAsString = value === 0 ? '0' : (value || ''); - const styleWidth = Math.max(options.min.toString().length, options.max.toString().length) + 'ch' + const styleWidth = Math.max(options.min.toString().length, options.max.toString().length) + 'ch'; return (