mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
Merge pull request #6046 from ToolJet/branch/fix-release-conflicts
Merge Main to Develop
This commit is contained in:
commit
2a5ac1c2b6
4 changed files with 16 additions and 6 deletions
2
.version
2
.version
|
|
@ -1 +1 @@
|
|||
2.4.4
|
||||
2.4.5
|
||||
|
|
|
|||
|
|
@ -20,7 +20,15 @@ export const Modal = function Modal({
|
|||
dataCy,
|
||||
}) {
|
||||
const [showModal, setShowModal] = useState(false);
|
||||
const { hideOnEsc, hideCloseButton, hideTitleBar, loadingState, useDefaultButton, triggerButtonLabel } = properties;
|
||||
const {
|
||||
closeOnClickingOutside = false,
|
||||
hideOnEsc,
|
||||
hideCloseButton,
|
||||
hideTitleBar,
|
||||
loadingState,
|
||||
useDefaultButton,
|
||||
triggerButtonLabel,
|
||||
} = properties;
|
||||
const {
|
||||
headerBackgroundColor,
|
||||
headerTextColor,
|
||||
|
|
@ -87,7 +95,7 @@ export const Modal = function Modal({
|
|||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (containerProps.mode === 'view') {
|
||||
if (closeOnClickingOutside) {
|
||||
const handleClickOutside = (event) => {
|
||||
const modalRef = parentRef.current.parentElement.parentElement.parentElement;
|
||||
|
||||
|
|
@ -102,7 +110,7 @@ export const Modal = function Modal({
|
|||
};
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [containerProps.mode, parentRef]);
|
||||
}, [closeOnClickingOutside, parentRef]);
|
||||
|
||||
return (
|
||||
<div className="container" data-disabled={disabledState} data-cy={dataCy}>
|
||||
|
|
|
|||
|
|
@ -833,7 +833,8 @@ export const widgets = [
|
|||
},
|
||||
hideTitleBar: { type: 'toggle', displayName: 'Hide title bar' },
|
||||
hideCloseButton: { type: 'toggle', displayName: 'Hide close button' },
|
||||
hideOnEsc: { type: 'toggle', displayName: 'Hide on escape' },
|
||||
hideOnEsc: { type: 'toggle', displayName: 'Close on escape key' },
|
||||
closeOnClickingOutside: { type: 'toggle', displayName: 'Close on clicking outside' },
|
||||
|
||||
size: {
|
||||
type: 'select',
|
||||
|
|
@ -933,6 +934,7 @@ export const widgets = [
|
|||
hideTitleBar: { value: '{{false}}' },
|
||||
hideCloseButton: { value: '{{false}}' },
|
||||
hideOnEsc: { value: '{{true}}' },
|
||||
closeOnClickingOutside: { value: '{{false}}' },
|
||||
},
|
||||
events: [],
|
||||
styles: {
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
2.4.4
|
||||
2.4.5
|
||||
|
|
|
|||
Loading…
Reference in a new issue