@centreon/ui 25.11.2 → 25.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -137,6 +137,8 @@ const ConnectedAutocomplete = ({
|
|
|
137
137
|
getEndpoint={getEndpoint}
|
|
138
138
|
decoder={connectedAutocomplete?.decoder}
|
|
139
139
|
getRenderedOptionText={connectedAutocomplete?.getRenderedOptionText}
|
|
140
|
+
getOptionLabel={connectedAutocomplete?.getOptionLabel}
|
|
141
|
+
optionProperty={connectedAutocomplete?.optionProperty}
|
|
140
142
|
initialPage={1}
|
|
141
143
|
isOptionEqualToValue={isOptionEqualToValue}
|
|
142
144
|
label={t(label)}
|
|
@@ -62,6 +62,8 @@ export interface InputProps {
|
|
|
62
62
|
endpoint?: string;
|
|
63
63
|
filterKey?: string;
|
|
64
64
|
getRenderedOptionText?: (option) => string | JSX.Element;
|
|
65
|
+
getOptionLabel?: (option) => string;
|
|
66
|
+
optionProperty?: string;
|
|
65
67
|
disableSelectAll?: boolean;
|
|
66
68
|
limitTags?: number;
|
|
67
69
|
decoder?;
|
|
@@ -65,7 +65,7 @@ const ConnectedAutocompleteField = (
|
|
|
65
65
|
open,
|
|
66
66
|
exclusionOptionProperty = 'id',
|
|
67
67
|
searchConditions = [],
|
|
68
|
-
getRenderedOptionText = (option): string => option
|
|
68
|
+
getRenderedOptionText = (option): string => option?.name?.toString(),
|
|
69
69
|
getRequestHeaders,
|
|
70
70
|
displayOptionThumbnail,
|
|
71
71
|
queryKey,
|
|
@@ -36,7 +36,7 @@ const MultiAutocompleteField = ({
|
|
|
36
36
|
disableSortedOptions = false,
|
|
37
37
|
disableSelectAll = true,
|
|
38
38
|
optionProperty = 'name',
|
|
39
|
-
getOptionLabel = (option): string => option
|
|
39
|
+
getOptionLabel = (option): string => option?.name,
|
|
40
40
|
getTagLabel = (option): string => option[optionProperty],
|
|
41
41
|
getOptionTooltipLabel,
|
|
42
42
|
chipProps,
|