ktmud commented on a change in pull request #18952:
URL: https://github.com/apache/superset/pull/18952#discussion_r816163749
##########
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;
+ customLabel?: ReactNode;
+}
+
+export type RawValues = RawValue[];
+export type LabeledValues = LabeledValue[];
+export type SelectValue = RawValue | LabeledValue | RawValues | LabeledValues;
Review comment:
I'm fine with either way. But ideally the `Select` component itself
should probably be generic. Similar to this:
https://github.com/ktmud/chakra-ui-select/blob/main/Select/Select.tsx#L75-L78
--
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]