Skip to content

Commit 991d357

Browse files
committed
fixup! feat(form): add support for disabling various array input capabilities
1 parent 64575d6 commit 991d357

File tree

1 file changed

+9
-10
lines changed
  • packages/sanity/src/core/form/inputs/arrays/ArrayOfPrimitivesInput

1 file changed

+9
-10
lines changed

packages/sanity/src/core/form/inputs/arrays/ArrayOfPrimitivesInput/ItemRow.tsx

+9-10
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,15 @@ export const ItemRow = forwardRef(function ItemRow(
113113
icon={InsertAboveIcon}
114114
/>
115115
),
116-
!disableActions.includes('add') &&
117-
!(disableActions.includes('addAfter') && disableActions.includes('addBefore')) && (
118-
<InsertMenuGroup
119-
pos="after"
120-
types={insertableTypes}
121-
onInsert={handleInsert}
122-
text={t('inputs.array.action.add-after')}
123-
icon={InsertBelowIcon}
124-
/>
125-
),
116+
!disableActions.includes('add') && !disableActions.includes('addAfter') && (
117+
<InsertMenuGroup
118+
pos="after"
119+
types={insertableTypes}
120+
onInsert={handleInsert}
121+
text={t('inputs.array.action.add-after')}
122+
icon={InsertBelowIcon}
123+
/>
124+
),
126125
].filter(Boolean),
127126
[disableActions, handleCopy, handleDuplicate, handleInsert, insertableTypes, onRemove, t],
128127
)

0 commit comments

Comments
 (0)