Updated MultiItemFieldInput to display current value properly (#6857)
This commit is contained in:
@ -48,7 +48,6 @@ export const MultiItemFieldInput = <T,>({
|
|||||||
hotkeyScope,
|
hotkeyScope,
|
||||||
}: MultiItemFieldInputProps<T>) => {
|
}: MultiItemFieldInputProps<T>) => {
|
||||||
const containerRef = useRef<HTMLDivElement>(null);
|
const containerRef = useRef<HTMLDivElement>(null);
|
||||||
|
|
||||||
const handleDropdownClose = () => {
|
const handleDropdownClose = () => {
|
||||||
onCancel?.();
|
onCancel?.();
|
||||||
};
|
};
|
||||||
@ -71,8 +70,9 @@ export const MultiItemFieldInput = <T,>({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleEditButtonClick = (index: number) => {
|
const handleEditButtonClick = (index: number) => {
|
||||||
|
const item = items[index] as { label: string; url: string };
|
||||||
setItemToEditIndex(index);
|
setItemToEditIndex(index);
|
||||||
setInputValue((items[index] as unknown as string) || '');
|
setInputValue(item.url || '');
|
||||||
setIsInputDisplayed(true);
|
setIsInputDisplayed(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user