- {enableSavedAggregationsQueries &&
}
-
-
`
+ // rather than a child. LG Modal portals its DOM to document.body,
+ // but React's synthetic event system still bubbles events through
+ // the React tree — so if the modal's submit button were a React
+ // descendant of this form, the form's onSubmit (Apply Query) would
+ // intercept the submit event and the modal's own handleSubmit would
+ // never run. Keeping the modal at the fragment root avoids that
+ // bubbling and lets the modal own its own submit.
+ <>
+
- {isQueryOptionsExpanded &&
- queryOptionsLayout &&
- queryOptionsLayout.length > 0 && (
-
- {queryOptionsLayout.map((queryOptionRowLayout, rowIndex) => (
-
+ {queryOptionsLayout && queryOptionsLayout.length > 0 && (
+
+
- ))}
-
- )}
-
+
+ )}
+
+ {isQueryOptionsExpanded &&
+ queryOptionsLayout &&
+ queryOptionsLayout.length > 0 && (
+
+ {queryOptionsLayout.map((queryOptionRowLayout, rowIndex) => (
+
+ ))}
+
+ )}
+