Fixed immediate UI update after Enter on single-item fields (#15825)

Previously, single-item fields `maxItemCount: 1` didn’t show updated
values after pressing `Enter` the UI only refreshed on click outside.
This happened because the items list was hidden while
`shouldAutoEditSingleItem` remained true.

This PR updates the render condition to also check `!isInputDisplayed`,
ensuring the items list re-renders immediately after editing.

**Result:** Instant UI updates on Enter with no impact on multi-item
fields.

Fixes #15792

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
Rajdeep Das
2025-11-19 15:45:17 +05:30
committed by GitHub
parent eab123f999
commit 4b0d1cd848
@@ -217,7 +217,7 @@ export const MultiItemFieldInput = <T,>({
return (
<DropdownContent ref={containerRef}>
{!!items.length && !shouldAutoEditSingleItem && (
{!!items.length && (!shouldAutoEditSingleItem || !isInputDisplayed) && (
<>
<DropdownMenuItemsContainer hasMaxHeight>
{items.map((item, index) =>