Skip to content

Commit

Permalink
Updated MultiItemFieldInput to display current value properly (#6857)
Browse files Browse the repository at this point in the history
  • Loading branch information
ehconitin authored Sep 2, 2024
1 parent 464fd5c commit f15c5e5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export const MultiItemFieldInput = <T,>({
hotkeyScope,
}: MultiItemFieldInputProps<T>) => {
const containerRef = useRef<HTMLDivElement>(null);

const handleDropdownClose = () => {
onCancel?.();
};
Expand All @@ -71,8 +70,9 @@ export const MultiItemFieldInput = <T,>({
};

const handleEditButtonClick = (index: number) => {
const item = items[index] as { label: string; url: string };
setItemToEditIndex(index);
setInputValue((items[index] as unknown as string) || '');
setInputValue(item.url || '');
setIsInputDisplayed(true);
};

Expand Down

0 comments on commit f15c5e5

Please sign in to comment.