Updated MultiItemFieldInput to display current value properly (#6857)

This commit is contained in:
nitin
2024-09-02 21:20:54 +05:30
committed by GitHub
parent 464fd5c485
commit f15c5e5b58

View File

@ -48,7 +48,6 @@ export const MultiItemFieldInput = <T,>({
hotkeyScope,
}: MultiItemFieldInputProps<T>) => {
const containerRef = useRef<HTMLDivElement>(null);
const handleDropdownClose = () => {
onCancel?.();
};
@ -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);
};