fix(ui): autocomplete type is missing

This commit is contained in:
Shekar Siri 2024-07-05 14:11:28 +02:00
parent 779983b487
commit f2b310d205

View file

@ -152,16 +152,12 @@ function FilterAutoComplete(props: Props) {
if (key === 'type' && params[key] === 'metadata') {
acc['key'] = params['key'].replace(/^_/, '');
acc['type'] = 'metadata';
} else {
acc[key] = params[key];
}
return acc;
}, {});
// const _params: Record<string, string> = {}
// const keys = Object.keys(params);
// keys.forEach((key) => {
// _params[key.replace('_', '')] = params[key];
// })
new APIClient()
[method?.toLocaleLowerCase()](endpoint, { ..._params, q: inputValue })
.then((response: any) => {
@ -267,11 +263,3 @@ function FilterAutoComplete(props: Props) {
}
export default FilterAutoComplete;
const DropdownIndicator = (props: DropdownIndicatorProps<true>) => {
return (
<components.DropdownIndicator {...props}>
<Icon name="chevron-down" size="16" />
</components.DropdownIndicator>
);
};