From 48da38bffcb165e6177b82a857bf4451adc4b8d5 Mon Sep 17 00:00:00 2001 From: MTG2000 Date: Wed, 5 Oct 2022 15:15:42 +0300 Subject: [PATCH] fix: tags input color --- src/Components/Inputs/TagsInput/TagsInput.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Components/Inputs/TagsInput/TagsInput.tsx b/src/Components/Inputs/TagsInput/TagsInput.tsx index 7ea02c3..da897db 100644 --- a/src/Components/Inputs/TagsInput/TagsInput.tsx +++ b/src/Components/Inputs/TagsInput/TagsInput.tsx @@ -52,8 +52,9 @@ export default function TagsInput({ const maxReached = value.length >= max; + const currentPlaceholder = props.placeholder ??
+ {maxReached ? '' : value.length > 0 ? "Add Another..." : placeholder}
- const currentPlaceholder = maxReached ? '' : value.length > 0 ? "Add Another..." : placeholder; const tagsOptions = !maxReached ? (officalTags.data?.officialTags ?? []).filter(t => !value.some((v) => v.title === t.title)).map(transformer.tagToOption) : [];