Only show list item add instructions when allowed
This commit is contained in:
parent
9a16d79ab9
commit
c483cf6dc6
@ -44,7 +44,7 @@ export default function ListInput({
|
|||||||
<PillsInput
|
<PillsInput
|
||||||
mt={mt}
|
mt={mt}
|
||||||
label={label}
|
label={label}
|
||||||
description="Press enter or comma to add item"
|
description={canAdd ? "Press enter or comma to add item" : ""}
|
||||||
>
|
>
|
||||||
<Pill.Group>
|
<Pill.Group>
|
||||||
{(form.getTransformedValues()[field_key] as string[]).map(
|
{(form.getTransformedValues()[field_key] as string[]).map(
|
||||||
|
@ -31,7 +31,10 @@ export default function ListInput({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PillsInput label={label} description="Press enter or comma to add item">
|
<PillsInput
|
||||||
|
label={label}
|
||||||
|
description={canAdd ? "Press enter or comma to add item" : ""}
|
||||||
|
>
|
||||||
<Pill.Group>
|
<Pill.Group>
|
||||||
{value.map((item: string) => (
|
{value.map((item: string) => (
|
||||||
<Pill
|
<Pill
|
||||||
|
Loading…
x
Reference in New Issue
Block a user