added entity input for service target

This commit is contained in:
ari committed 2022-06-14 21:57:39 -04:00
1 parent f6ca454999
commit 184d8a8584
7 files changed
+540 -122

No files matched your search

@@ -60,9 +60,11 @@ export function InputAutoComplete<T extends Option>(
? [props.value]
: [];
const errors = props.validateOption ? props.validateOption(value) : null;
const options = props.options.sort((a, b) => {
return getID(a) > getID(b) ? 1 : -1;
});
const options = props.options
.filter((opt) => !value.includes(getID(opt)))
.sort((a, b) => {
return getID(a) > getID(b) ? 1 : -1;
});
// processing of errors
let helperText = props.helperText ?? <></>;
@@ -104,7 +106,6 @@ export function InputAutoComplete<T extends Option>(
props.onChange(cleanValue[cleanValue.length - 1]);
}
};
return (
<Autocomplete
className={["input-autocomplete", props.className ?? ""].join(" ")}