fix(ui): filter check for key and type (#1782)
This commit is contained in:
parent
3ae4983154
commit
0905726474
2 changed files with 5 additions and 2 deletions
|
|
@ -146,7 +146,9 @@ function FilterAutoComplete(props: Props) {
|
|||
const loadOptions = (inputValue: string, callback: (options: []) => void) => {
|
||||
// remove underscore from params
|
||||
const _params = Object.keys(params).reduce((acc: any, key: string) => {
|
||||
acc[key] = params[key].replace(/^_/, '');
|
||||
if (key === 'type' && params[key] === 'metadata') {
|
||||
acc[key] = params[key].replace(/^_/, '');
|
||||
}
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
|
|
|
|||
|
|
@ -642,7 +642,8 @@ export const addElementToLiveFiltersMap = (
|
|||
icon = 'filters/metadata'
|
||||
) => {
|
||||
liveFiltersMap[key] = {
|
||||
key, type, category, label: capitalize(key),
|
||||
key, type, category,
|
||||
label: key.replace(/^_/, '').charAt(0).toUpperCase() + key.slice(2),
|
||||
operator: operator,
|
||||
operatorOptions,
|
||||
icon,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue