michael-s-molina commented on a change in pull request #19076:
URL: https://github.com/apache/superset/pull/19076#discussion_r827021205



##########
File path: superset-frontend/src/components/Select/utils.ts
##########
@@ -61,7 +61,7 @@ export function findValue<OptionType extends OptionTypeBase>(
 }
 
 export function getValue(option: string | number | { value: string | number }) 
{
-  return typeof option === 'object' ? option.value : option;
+  return option && typeof option === 'object' ? option.value : option;

Review comment:
       @diegomedina248 Please disregard my previous message. To support Ant 
Design's different behavior depending on whether `labelInValue` is active, we 
need to also account for an option being `null`. You can keep your last commit 
where `getValue(option: string | number | { value: string | number | null } | 
null)`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to