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



##########
File path: superset-frontend/src/components/Select/Select.tsx
##########
@@ -44,7 +43,21 @@ import { hasOption } from './utils';
 
 const { Option } = AntdSelect;
 
-type AntdSelectAllProps = AntdSelectProps<AntdSelectValue>;
+export type RawValue = string | number;
+
+export interface LabeledValue {
+  key?: string;
+  value: RawValue;
+  label: ReactNode;

Review comment:
       The idea when introducing the `customLabel` prop was that `label` would 
always be a `string` that could be searched/compared and `customLabel` would be 
used when you want a `React.Node`.  The `hasOption` function is comparing the 
labels as strings. One example of this use is the tables select where label is 
the name of the table, `customLabel` is a node with an icon and the name, and 
value is the `id` of the table.




-- 
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