Skip to content

Commit 2a65a24

Browse files
authored
fix(FilterBar): use createPortal for FilterDialog within FilterBar (#655)
Closes #652
1 parent 38b5ed4 commit 2a65a24

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/main/src/components/FilterBar/FilterDialog.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import { Ui5DialogDomRef } from '../../interfaces/Ui5DialogDomRef';
3131
import { stopPropagation } from '../../internal/stopPropagation';
3232
import styles from './FilterBarDialog.jss';
3333
import { filterValue, renderSearchWithValue } from './utils';
34+
import { createPortal } from 'react-dom';
3435

3536
const useStyles = createComponentStyles(styles, { name: 'FilterBarDialog' });
3637
export const FilterDialog = (props) => {
@@ -270,7 +271,7 @@ export const FilterDialog = (props) => {
270271
});
271272
}, [renderChildren, toggledFilters, handleCheckBoxChange]);
272273

273-
return (
274+
return createPortal(
274275
<Dialog ref={dialogRef} header={renderHeader()} footer={renderFooter()} onAfterClose={handleClose}>
275276
<div className={classes.dialog}>
276277
{renderFBSearch && (
@@ -281,6 +282,7 @@ export const FilterDialog = (props) => {
281282
)}
282283
{renderGroups()}
283284
</div>
284-
</Dialog>
285+
</Dialog>,
286+
document.body
285287
);
286288
};

0 commit comments

Comments
 (0)