Merge pull request #6046 from ToolJet/branch/fix-release-conflicts

Merge Main to Develop
This commit is contained in:
Midhun G S 2023-04-14 18:12:25 +05:30 committed by GitHub
commit 2a5ac1c2b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 6 deletions

View file

@ -1 +1 @@
2.4.4
2.4.5

View file

@ -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}>

View file

@ -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: {

View file

@ -1 +1 @@
2.4.4
2.4.5