From a67eee8f4cc153e5f95d6c4be0e3ed3f34177e72 Mon Sep 17 00:00:00 2001 From: WithoutPants <53250216+WithoutPants@users.noreply.github.com> Date: Fri, 9 Dec 2022 12:05:05 +1100 Subject: [PATCH] Fix placeholder in string list input (#3257) --- ui/v2.5/src/components/Settings/Inputs.tsx | 2 +- ui/v2.5/src/components/Shared/StringListInput.tsx | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/v2.5/src/components/Settings/Inputs.tsx b/ui/v2.5/src/components/Settings/Inputs.tsx index 8e70b095e..b14774e9c 100644 --- a/ui/v2.5/src/components/Settings/Inputs.tsx +++ b/ui/v2.5/src/components/Settings/Inputs.tsx @@ -429,7 +429,7 @@ export const StringListSetting: React.FC = (props) => { )} renderValue={(value) => ( diff --git a/ui/v2.5/src/components/Shared/StringListInput.tsx b/ui/v2.5/src/components/Shared/StringListInput.tsx index e3e714c85..6ea0929e6 100644 --- a/ui/v2.5/src/components/Shared/StringListInput.tsx +++ b/ui/v2.5/src/components/Shared/StringListInput.tsx @@ -6,13 +6,13 @@ import Icon from "src/components/Shared/Icon"; interface IStringListInputProps { value: string[]; setValue: (value: string[]) => void; - defaultNewValue?: string; + placeholder?: string; className?: string; errors?: string; } export const StringListInput: React.FC = (props) => { - const values = props.value.concat(props.defaultNewValue || ""); + const values = props.value.concat(""); function valueChanged(idx: number, value: string) { const newValues = values @@ -43,6 +43,7 @@ export const StringListInput: React.FC = (props) => { onChange={(e: React.ChangeEvent) => valueChanged(i, e.currentTarget.value) } + placeholder={props.placeholder} />