-
-
- {t(title)}
-
- {filterable && (
-
-
-
-
- {' '}
- {t('Filter List')}
- >
- }
- >
- {filters
- .map(({ id, Header }) => ({
- Header,
- id,
- }))
- .map((ft: InternalFilter) => (
-
- ))}
-
-
-
- )}
-
-
- {internalFilters.map((ft, i) => {
- const filter = filters.find(f => f.id === ft.id);
- if (!filter) {
- console.error(`could not find filter for ${ft.id}`);
- return null;
- }
- return (
-
+
+ {!useNewUIFilters && (
+ <>
+ {title && filterable && (
+ <>
-
- {ft.Header}
+
+ {t(title)}
-
- ) => {
- updateInternalFilter(i, {
- operator: e.currentTarget.value,
- });
- }}
- >
- {filter.operators.map(({ label, value }: Select) => (
-
- ))}
-
-
-
-
- {filter.input === 'select' && (
- {
- updateInternalFilter(i, {
- operator: ft.operator || filter.operators[0].value,
- value: e ? e.map(s => s.value) : e,
- });
- }}
- />
- )}
- {filter.input !== 'select' && (
- ) => {
- e.persist();
- updateInternalFilter(i, {
- operator: ft.operator || filter.operators[0].value,
- value: extractInputValue(filter.input, e),
- });
- }}
+ {filterable && (
+
+
- )}
-
-
- removeFilterAndApply(i)}
- >
-
-
-
+
+ )}
-
-
- );
- })}
- {internalFilters.length > 0 && (
- <>
-
-
-
-
-
-
-
- >
- )}
-
- )}
+
+
+ >
+ )}
+ >
+ )}
+ {useNewUIFilters && (
+ <>
+
+
+ {t(title)}
+
+
+
+
+ >
+ )}
+