fix: date is not changable in signyourself flow of mobile

This commit is contained in:
prafull-opensignlabs
2024-03-14 21:39:22 +05:30
parent 7882c61b81
commit db9ae71d67
2 changed files with 17 additions and 1 deletions
@@ -144,6 +144,21 @@ function Placeholder(props) {
return () => clearTimeout(timer);
}, [props.pos]);
useEffect(() => {
const closeMenuOnOutsideClick = (e) => {
if (!isDraggingEnabled && !e.target.closest("#changeIsDragging")) {
setDraggingEnabled(true);
}
};
document.addEventListener("click", closeMenuOnOutsideClick);
return () => {
// Cleanup the event listener when the component unmounts
document.removeEventListener("click", closeMenuOnOutsideClick);
};
}, [isDraggingEnabled]);
//function change format array list with selected date and format
const changeDateFormat = () => {
const updateDate = [];
@@ -2,6 +2,7 @@ import React from "react";
import { themeColor } from "../../constant/const";
import {
defaultWidthHeight,
isMobile,
radioButtonWidget,
resizeBorderExtraWidth
} from "../../constant/Utils";
@@ -30,7 +31,7 @@ function PlaceholderBorder(props) {
};
return (
<div
onMouseEnter={props?.setDraggingEnabled(true)}
onMouseEnter={!isMobile && props?.setDraggingEnabled(true)}
className="borderResize"
style={{
borderColor: themeColor,