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:
+1
-1
@@ -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) =>
|
||||
|
||||
Reference in New Issue
Block a user