From a1140191d6bbce0c6dd6f02876f47e19ba9f6786 Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Mon, 22 Aug 2022 17:59:35 +0200 Subject: [PATCH] Disable remove button only when it's the last field (#3136) --- src/components/multi-line-input/MultiLineInput.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/multi-line-input/MultiLineInput.tsx b/src/components/multi-line-input/MultiLineInput.tsx index 101e7d6c74..c80d631360 100644 --- a/src/components/multi-line-input/MultiLineInput.tsx +++ b/src/components/multi-line-input/MultiLineInput.tsx @@ -64,7 +64,7 @@ export const MultiLineInput = ({ onClick={() => remove(index)} tabIndex={-1} aria-label={t("common:remove")} - isDisabled={index === 0} + isDisabled={fields.length === 1} >