Fixed filter parameters.

This commit is contained in:
Mike Cao committed 2023-10-16 20:44:22 -07:00
1 parent b1d3970ea7
commit 81a810bd73
9 files changed
+36 -44

No files matched your search

+2 -2
View File
@@ -7,7 +7,7 @@ import FieldAggregateForm from './FieldAggregateForm';
import FieldFilterForm from './FieldFilterForm';
import styles from './FieldAddForm.module.css';
export function FieldAddForm({ fields = [], group, element, onAdd, onClose }) {
export function FieldAddForm({ fields = [], group, onAdd, onClose }) {
const [selected, setSelected] = useState();
const handleSelect = value => {
@@ -28,7 +28,7 @@ export function FieldAddForm({ fields = [], group, element, onAdd, onClose }) {
};
return createPortal(
<PopupForm className={styles.popup} element={element} onClose={onClose}>
<PopupForm className={styles.popup}>
{!selected && <FieldSelectForm fields={fields} onSelect={handleSelect} />}
{selected && group === REPORT_PARAMETERS.fields && (
<FieldAggregateForm {...selected} onSelect={handleSave} />