From 7814c817b97a29313445b752c763f7824584d363 Mon Sep 17 00:00:00 2001 From: mikkancso Date: Thu, 8 Feb 2024 11:04:51 +0100 Subject: [PATCH] Select: fix type of `formatCreateLabel` prop (#82138) fix type of formatCreateLabel prop of Select --- packages/grafana-ui/src/components/Select/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/grafana-ui/src/components/Select/types.ts b/packages/grafana-ui/src/components/Select/types.ts index 41051f7cd05..9ab7b930664 100644 --- a/packages/grafana-ui/src/components/Select/types.ts +++ b/packages/grafana-ui/src/components/Select/types.ts @@ -37,7 +37,7 @@ export interface SelectCommonProps { filterOption?: (option: SelectableValue, searchQuery: string) => boolean; formatOptionLabel?: (item: SelectableValue, formatOptionMeta: FormatOptionLabelMeta) => React.ReactNode; /** Function for formatting the text that is displayed when creating a new value*/ - formatCreateLabel?: (input: string) => string; + formatCreateLabel?: (input: string) => React.ReactNode; getOptionLabel?: (item: SelectableValue) => React.ReactNode; getOptionValue?: (item: SelectableValue) => T | undefined; hideSelectedOptions?: boolean;