mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-06-20 17:00:18 +02:00
Add information if an autocomplete option is arbitrary or not
Co-authored-by: Thomas Zerr<thomas.zerr@cloudogu.com> Pushed-by: Thomas Zerr<thomas.zerr@cloudogu.com>
This commit is contained in:
@@ -53,6 +53,7 @@ function useAutocompleteOptions(
|
||||
value: options.allowArbitraryValues(query),
|
||||
label: query,
|
||||
displayValue: t("form.combobox.arbitraryDisplayValue", { query }),
|
||||
isArbitraryValue: true,
|
||||
});
|
||||
}
|
||||
return result;
|
||||
|
||||
@@ -21,4 +21,9 @@ export type Option<T> = {
|
||||
* Takes precedence over the label in alternative selection modes (i.e. popups in combo-boxes).
|
||||
*/
|
||||
displayValue?: string;
|
||||
|
||||
/**
|
||||
* If this flag is true, then the option value, does not actually exist in any data source. For example in the backend.
|
||||
*/
|
||||
isArbitraryValue?: boolean;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user