feat: enhance TypeAsyncDropdown to handle object values and improve label retrieval

This commit is contained in:
faisolavolut 2025-02-26 13:46:10 +07:00
parent 8bdc37c910
commit 6ed1e29fed
1 changed files with 5 additions and 0 deletions

View File

@ -201,6 +201,11 @@ export const TypeAsyncDropdown: React.FC<any> = ({
} else {
value = [];
}
} else if (typeof value === "object") {
value = {
value: getLabel(value),
label: getLabel(value),
};
} else if (
!target &&
typeof value !== "object" &&