fix(dashboard): Use ChipInput for option forms (#7603)

Resolves CORE-2069, CORE-2068
This commit is contained in:
Kasper Fabricius Kristensen
2024-06-04 16:48:04 +02:00
committed by GitHub
parent 1ba887f4c9
commit 3f75e207ce
5 changed files with 43 additions and 16 deletions

View File

@@ -19,6 +19,7 @@ type ChipInputProps = {
allowDuplicates?: boolean
showRemove?: boolean
variant?: "base" | "contrast"
placeholder?: string
className?: string
}
@@ -33,6 +34,7 @@ export const ChipInput = forwardRef<HTMLInputElement, ChipInputProps>(
showRemove = true,
variant = "base",
allowDuplicates = false,
placeholder,
className,
},
ref
@@ -178,6 +180,8 @@ export const ChipInput = forwardRef<HTMLInputElement, ChipInputProps>(
disabled={disabled}
name={name}
ref={innerRef}
placeholder={chips.length === 0 ? placeholder : undefined}
autoComplete="off"
/>
</div>
)