From ece95f87befac20e38ab7ab7458c5d0377fff157 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivar=20Conradi=20=C3=98sthus?= Date: Wed, 23 Sep 2020 19:50:00 +0200 Subject: [PATCH] fix: list parameters should be trimmed see https://github.com/Unleash/unleash/issues/629 --- .../strategy-input-list-test.jsx.snap | 28 +++++++++++++++---- .../feature/form/strategy-input-list.jsx | 13 ++++++--- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/frontend/src/component/feature/form/__tests__/__snapshots__/strategy-input-list-test.jsx.snap b/frontend/src/component/feature/form/__tests__/__snapshots__/strategy-input-list-test.jsx.snap index d6dac1cf83..8bea8dadf4 100644 --- a/frontend/src/component/feature/form/__tests__/__snapshots__/strategy-input-list-test.jsx.snap +++ b/frontend/src/component/feature/form/__tests__/__snapshots__/strategy-input-list-test.jsx.snap @@ -3,7 +3,13 @@ exports[`renders correctly when disabled 1`] = `

- featureName + + Please specify the list of + + featureName + + : +

- featureName + + Please specify the list of + + featureName + + : +

- featureName + + Please specify the list of + + featureName + + : +

a); this.textInput.inputRef.value = ''; - setConfig(name, list.join(',')); + setConfig(name, newList.join(',')); } }; @@ -53,7 +54,11 @@ export default class InputList extends Component { const { name, list, disabled } = this.props; return (
-

{name}

+

+ + Please specify the list of {name}: + +

{list.map((entryValue, index) => ( @@ -75,7 +80,7 @@ export default class InputList extends Component { name={`${name}_input`} style={{ width: '100%', flex: 1 }} floatingLabel - label="Add list entry" + label="Enter value (val1, val2)" onFocus={this.onFocus.bind(this)} onBlur={this.onBlur.bind(this)} ref={input => {